http://sourceware.org/bugzilla/show_bug.cgi?id=14915
--- Comment #8 from Michael Matz <matz at suse dot de> 2012-12-04 14:56:09 UTC --- Let's create a different testcase showing also similar symptoms of not correctly adding DT_NEEDED entries as documented, this time to search scopes: % cat bla.c extern double sin (double); double f (double i) { return sin (i); } % gcc -c -fPIC bla.c % ./ld/ld-new -shared -o libt1.so bla.o -lm -zdefs % readelf -d libt1.so | grep NEEDED 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] Everything fine so far. Now we want to generate libt2 also referring to a libm function, want to link it only with libt1 and expect that there's some way to include libm into the search scopes with some option to ld. The documented option is --copy-dt-needed-entries, so: % cat bla2.c extern double f (double); extern double sin (double); double g (double i) { return f(i) + sin (i); } % gcc -c -fPIC bla2.c So, bla2 refers to functions of libt1 and to libm, but still: % ./ld/ld-new -shared -o libt2.so bla.o --copy-dt-needed-entries -L. -lt1 -z defs bla2.o: In function `g': bla2.c:(.text+0x22): undefined reference to `sin' -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils