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' ...
Created attachment 2107 [details] libm ARM Debian
Created attachment 2114 [details] Remove bogus assertion and instead exit function cleanly if there is no glue bfd
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
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?
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.