[EMAIL PROTECTED] needed-5]$ cat foo.c extern void bar (); void foo () { bar (); } [EMAIL PROTECTED] needed-5]$ cat bar.c void bar () { } [EMAIL PROTECTED] needed-5]$ cat main.c extern void foo ();
int main () { foo (); return 0; } [EMAIL PROTECTED] needed-5]$ make foo gcc -O -g -c -o main.o main.c gcc -O -g -fPIC -c -o bar.o bar.c gcc -shared -o libbar.so bar.o gcc -O -g -fPIC -c -o foo.o foo.c gcc -shared -o libfoo.so foo.o gcc -o foo main.o -Wl,--as-needed libfoo.so libbar.so -Wl,--no-as-needed -Wl,-rpath,. libfoo.so: undefined reference to `bar' collect2: ld returned 1 exit status make: *** [foo] Error 1 [EMAIL PROTECTED] needed-5]$ -- Summary: --as-needed doesn't work on more than 1 DSO Product: binutils Version: 2.19 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: hjl dot tools at gmail dot com CC: bug-binutils at gnu dot org http://sourceware.org/bugzilla/show_bug.cgi?id=6853 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils