BFD internal error when using ld --wrap when building Xenomai with uClibc
Sergei Poselenov
sposelenov@emcraft.com
Thu Dec 28 07:07:00 GMT 2006
- Previous message (by thread): New PRs for various failing test-results (arm, d10v, frv, h8300, iq2000, m32c, m32r, mcore, mips, mn10300, sh, v850)
- Next message (by thread): PATCH: Remember the symbol size if it isn't undefined
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Hello,
We have run into this problem when building the Xenomai 2.3-rc2
testsuite for ARM target using Gcc 4.0.0/binutils-2.16.1/uClibc-0.9.27
We were able to create a simpler testcase and tried it on some
x86-based systems.
- When using binutils-2.17.50.0.3-6 (Fedora Core 6) the linker
outputs:
/usr/bin/ld: /usr/bin/ld: BFD 2.17.50.0.3-6 20060715 internal error,
aborting at ../../bfd/bfd.c line 506 in _bfd_default_error_handler
/usr/bin/ld: Please report this bug.
collect2: ld returned 1 exit status
- On old RedHat 9 (binutils-2.13.90.0.18-9) the linking went ok with
warning:
/usr/bin/ld: Warning: size of symbol `__wrap_pthread_getschedparam1'
changed from 5 to 38 in ./libmy.so
- On Fedore Core-5 (binutils-2.16.91.0.6-5), the test even
segfaults:
gcc -c wrap.c lib.c func.c pthread.c -g -fpic
gcc -shared -o libpthread1.so pthread.o -g
gcc -shared -o libmy.so lib.o wrap.o ./libpthread1.so -g
gcc -c -o main.o main.c -g
gcc -o main -Wl,--wrap -Wl,pthread_getschedparam1 main.o ./libmy.so
./libpthread1.so
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/bin/ld: make: *** [all] Error 1
Interstingly enough, the error is gone if the libmy.so DSO is linked
without the reference to libpthread1.so, i.e.:
gcc -shared -o libmy.so lib.o wrap.o -g
The testcase tarball and proposed fix to bfd/elflink.c are attached.
Regards,
Sergei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld-kill.tgz
Type: application/x-compressed-tar
Size: 582 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20061228/cec8d05a/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ld-kill.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20061228/cec8d05a/attachment.ksh>
- Previous message (by thread): New PRs for various failing test-results (arm, d10v, frv, h8300, iq2000, m32c, m32r, mcore, mips, mn10300, sh, v850)
- Next message (by thread): PATCH: Remember the symbol size if it isn't undefined
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Binutils
mailing list