Bug 5398 - ld: assertion fail elf32-arm.c:3125
Summary: ld: assertion fail elf32-arm.c:3125
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-24 19:01 UTC by Martin Michlmayr
Modified: 2007-11-29 08:17 UTC (History)
1 user (show)

See Also:
Host:
Target: arm-linux-gnu
Build:
Last reconfirmed:


Attachments
libm ARM Debian (285.33 KB, application/octet-stream)
2007-11-24 19:02 UTC, Martin Michlmayr
Details
Remove bogus assertion and instead exit function cleanly if there is no glue bfd (563 bytes, patch)
2007-11-28 13:29 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Michlmayr 2007-11-24 19:01:36 UTC
I'm getting the following assertation on ARM (old ABI) with ld (both
2.18 and HEAD):

461:tbm@debian: ~] /usr/bin/ld -lc
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.18.20071027 assertion fail
../../bfd/elf32-arm.c:3123
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.18.20071027 assertion fail
../../bfd/elf32-arm.c:3123
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 00008100
462:tbm@debian: ~] ld /lib/libm.so.6
ld: BFD (GNU Binutils for Debian) 2.18.20071027 assertion fail
../../bfd/elf32-arm.c:3123
ld: warning: cannot find entry symbol _start; defaulting to 00008100

You can reproduce this with the attached file:

(sid)1894:tbm@em64t: ~/src/binutils/ld] ./ld-new ~/libm-2.6.1.so
./ld-new: warning: libc.so.6, needed by /home/tbm/libm-2.6.1.so, not found (try
using -rpath or -rpath-link)
./ld-new: BFD (GNU Binutils) 2.18.50.20071124 assertion fail elf32-arm.c:3125
./ld-new: warning: cannot find entry symbol _start; defaulting to 0000000000008100
/home/tbm/libm-2.6.1.so: undefined reference to `__assert_fail@GLIBC_2.0'
...
Comment 1 Martin Michlmayr 2007-11-24 19:02:33 UTC
Created attachment 2107 [details]
libm ARM Debian
Comment 2 Nick Clifton 2007-11-28 13:29:28 UTC
Created attachment 2114 [details]
Remove bogus assertion and instead exit function cleanly if there is no glue bfd
Comment 3 Nick Clifton 2007-11-28 13:30:19 UTC
Hi Martin,

  It appears that the assertion was being a little bit overzealous.  Please
could you try out the uploaded patch and let me know if it works for you.

Cheers
  Nick
Comment 4 Martin Michlmayr 2007-11-28 16:52:42 UTC
Nick,

Thanks for looking at this issue.  Your patch works for me.  The assertion
is gone and the test suite doesn't have any new failures.  Can you put this
into HEAD and the 2.18 branch please?
Comment 5 Nick Clifton 2007-11-29 08:17:36 UTC
Hi Martin,

  I have applied the patch to the 2.18 branch and HEAD.

Cheers
  Nick

bfd/ChangeLog
2007-11-29  Nick Clifton  <nickc@redhat.com>

	PR ld/5398
	* elf32-arm.c (bfd_elf32_arm_process_before_allocation): Do not
	complain if there is no glue bfd, just return.