https://sourceware.org/bugzilla/show_bug.cgi?id=24815
Bug ID: 24815
Summary: ld fails to find symbols from DT_NEEDED entries
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: ismael at linux dot com
Target Milestone: ---
The system I'm having problems with is a musl-libc based system; I've an almost
identical system with glibc which works fine.
$ echo 'int main(){return 0;}' > test.c
$ gcc -c test.c
$ gcc test.o -lxml2 -fuse-ld=gold
$ gcc test.o -lxml2 -llzma
$ gcc test.o -lxml2
/usr/bin/ld:
/usr/lib/gcc/x86_64-pc-linux-musl/9.1.0/../../../../lib/libxml2.so: unde
fined reference to `lzma_properties_decode@XZ_5.0'
/usr/bin/ld:
/usr/lib/gcc/x86_64-pc-linux-musl/9.1.0/../../../../lib/libxml2.so: unde
fined reference to `lzma_code@XZ_5.0'
/usr/bin/ld:
/usr/lib/gcc/x86_64-pc-linux-musl/9.1.0/../../../../lib/libxml2.so: unde
fined reference to `lzma_auto_decoder@XZ_5.0'
/usr/bin/ld:
/usr/lib/gcc/x86_64-pc-linux-musl/9.1.0/../../../../lib/libxml2.so: unde
fined reference to `lzma_end@XZ_5.0'
collect2: error: ld returned 1 exit status
$ readelf -d /usr/lib/libxml2.so|grep lzma
0x0000000000000001 (NEEDED) Shared library: [liblzma.so.5]
$ ldd /usr/lib/liblzma.so.5
ldd (0x7f6bc784b000)
libc.so => ldd (0x7f6bc784b000)
Files liked with all libraries specified on the command line work fine; I'm
guessing something on the binutils build is different.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils