http://sourceware.org/bugzilla/show_bug.cgi?id=14915
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|--copy-dt-needed-entries |--copy-dt-needed-entries |not working |not working when creating | |DSO --- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> 2012-12-04 18:28:14 UTC --- [hjl@gnu-6 pr14915]$ cat bla.c extern void bar (void); void f (void) { bar (); } [hjl@gnu-6 pr14915]$ cat bla2.c extern void f (void); extern void bar (void); int main (void) { f (); bar (); return 0; } [hjl@gnu-6 pr14915]$ cat bar.c void bar (void) { } [hjl@gnu-6 pr14915]$ make gcc -B./ -fPIC -c -o bla2.o bla2.c gcc -B./ -fPIC -c -o bla.o bla.c gcc -B./ -fPIC -c -o bar.o bar.c gcc -B./ -shared -o libbar.so bar.o -Wl,-z,defs gcc -B./ -shared -o libt1.so bla.o libbar.so -Wl,-z,defs gcc -B./ -o x bla2.o -Wl,--add-needed -L. -lt1 -Wl,-rpath-link=. -Wl,-z,defs gcc -B./ -shared -o libt2.so bla2.o -Wl,--add-needed -Wl,-rpath-link=. -L. -lt1 -Wl,-z,defs bla2.o: In function `main': bla2.c:(.text+0xa): undefined reference to `bar' collect2: error: ld returned 1 exit status make: *** [libt2.so] Error 1 [hjl@gnu-6 pr14915]$ -- 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