ld segfault linking qemu-alpha-static on armel

Bug #759507 reported by Steve Langasek on 2011-04-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)

Bug Description

Binary package hint: binutils

qemu-linaro is failing to build on armel due to a segfault when linking the alpha emulator:

  LINK alpha-linux-user/qemu-alpha
collect2: ld terminated with signal 7 [Bus error]

The full command being run is:

ld --build-id --no-add-needed -Bstatic -dynamic-linker /lib/ld-linux.so.3 -X --hash-style=gnu -m armelf_linux_eabi -z relro -o qemu-alpha /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.2/../../../crt1.o /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.2/../../../crti.o /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.2/crtbeginT.o -L/usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.2 -L/usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.2/../../.. -L/usr/lib/arm-linux-gnueabi --warn-common -Bsymbolic-functions -Bsymbolic-functions -T../config-host.ld -T /builddir/qemu-linaro-0.14.50-2011.03-1/arm.ld main.o syscall.o strace.o mmap.o signal.o thunk.o elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o qemu-malloc.o osdep.o oslib-posix.o ../libuser/envlist.o ../libuser/path.o ../libuser/tcg-runtime.o ../libuser/host-utils.o ../libuser/cutils.o ../libuser/cache-utils.o ../libdis-user/alpha-dis.o ../libdis-user/arm-dis.o exec.o translate-all.o cpu-exec.o translate.o tcg/tcg.o fpu/softfloat.o op_helper.o helper.o disas.o ../trace.o -lrt -lpthread -lm --start-group -lgcc -lgcc_eh -lc --end-group /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.2/crtend.o /usr/lib/arm-linux-gnueabi/gcc/arm-linux-gnueabi/4.5.2/../../../crtn.o

Program received signal SIGSEGV, Segmentation fault.
0x4033c948 in memcpy () at ../ports/sysdeps/arm/memcpy.S:259
259 ../ports/sysdeps/arm/memcpy.S: No such file or directory.
        in ../ports/sysdeps/arm/memcpy.S
(gdb) bt
#0 0x4033c948 in memcpy () at ../ports/sysdeps/arm/memcpy.S:259
#1 0x0003422c in sha1_process_bytes (buffer=0x403c907e, len=704538,
    ctx=0xbefb8dc0) at /usr/include/bits/string3.h:52
#2 0x4028655c in bfd_elf32_checksum_contents (abfd=0xc75c28,
    process=0x34178 <sha1_process_bytes>, arg=0xbefb8dc0)
    at ../../bfd/elfcode.h:1209
#3 0x0002cd84 in gldarmelf_linux_eabi_write_build_id_section (abfd=0xc75c28)
    at earmelf_linux_eabi.c:1393
#4 0x40292adc in _bfd_elf_write_object_contents (abfd=0xc75c28)
    at ../../bfd/elf.c:5207
#5 0x4025f424 in bfd_close (abfd=0xc75c28) at ../../bfd/opncls.c:706
#6 0x000211d4 in main (argc=7812, argv=0x43) at ../../ld/ldmain.c:519

Steve Langasek (vorlon) wrote :

running the same command without --build-id succeeds (?)

Matthias Klose (doko) wrote :

fixed in oneiric and later releases

Changed in binutils (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.