ld.bfd crashed with SIGSEGV in bfd_elf_final_link()

Bug #768905 reported by Paul Crawford
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Binary package hint: binutils

Was building a program and I think this was triggered by attempting to link with 32-bit libraries when building on a 64-bit system. The output of 'make' gave this sort of message:

gcc -Wall -DLINUX -O2 -DDUNDEE_COMPILE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include -I${SWDEV} -I../../DCPlib -o beacon bmain.o bprocess.o message.o ${SWDEV}/lib/libsat.a ${SWDEV}/lib/libutils.a -lm -lncurses -lm ${SWDEV}/lib/libdcp.a ${SWDEV}/lib/libsat.a ${SWDEV}/lib/libutils.a -lm -lncurses
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
/usr/bin/ld: i386 architecture of input file `/home/paul/win/swdev/lib/libsat.a(jnow.o)' is incompatible with i386:x86-64 output

Using 10.04 LTS with 64-bit version on quad core "Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz" machine. I have it dual-boot so I also have 32-bit 10.04 for some things that need it, hence the library issue.

$ lsb_release -rd
Description: Ubuntu 10.04.2 LTS
Release: 10.04

I expect, under these circumstances, to get a warning and error exit, not a core-dump due to segfault.

ProblemType: Crash
DistroRelease: Ubuntu 10.04
Package: binutils 2.20.1-3ubuntu7.1
ProcVersionSignature: Ubuntu 2.6.32-31.61-generic 2.6.32.32+drm33.14
Uname: Linux 2.6.32-31-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Fri Apr 22 11:42:12 2011
ExecutablePath: /usr/bin/ld.bfd
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcCmdline: /usr/bin/ld --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=both -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o beacon -z relro /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../.. -L/usr/lib/x86_64-linux-gnu bmain.o bprocess.o message.o /home/username/win/swdev/lib/libsat.a /home/username/win/swdev/lib/libutils.a -lm -lncurses -lm /home/username/win/swdev/lib/libdcp.a /home/username/win/swdev/lib/libsat.a /home/username/win/swdev/lib/libutils.a -lm -lncurses -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.4.3/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crtn.o
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0x2b3d2ed5255a: mov %rdx,0x30(%rax)
 PC (0x2b3d2ed5255a) ok
 source "%rdx" ok
 destination "0x30(%rax)" (0x200000030) not located in a known VMA region (needed writable region)!
SegvReason: writing unknown VMA
Signal: 11
SourcePackage: binutils
StacktraceTop:
 ?? () from /usr/lib/libbfd-2.20.1-system.20100303.so
 bfd_elf_final_link ()
 ?? ()
 ?? ()
 __libc_start_main () from /lib/libc.so.6
Title: ld.bfd crashed with SIGSEGV in bfd_elf_final_link()
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Paul Crawford (psc-sat) wrote :
visibility: private → public
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 elf64_x86_64_relocate_section (
 bfd_elf_final_link (abfd=<value optimized out>,
 ldwrite () at ../../ld/ldwrite.c:568
 main (argc=46, argv=0x7fff139ce7f8)

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in binutils (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Matthias Klose (doko) wrote :

please provide the object files needed for the link step.
is this reproducible with newer ubuntu versions (e.g. 12.04 LTS, or 12.10 development)?

Changed in binutils (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for binutils (Ubuntu) because there has been no activity for 60 days.]

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

Other bug subscribers

Remote bug watches

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