[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/6853] New: --as-needed doesn't work on more than 1 DSO
From: |
hjl dot tools at gmail dot com |
Subject: |
[Bug ld/6853] New: --as-needed doesn't work on more than 1 DSO |
Date: |
22 Aug 2008 22:02:33 -0000 |
address@hidden needed-5]$ cat foo.c
extern void bar ();
void
foo ()
{
bar ();
}
address@hidden needed-5]$ cat bar.c
void
bar ()
{
}
address@hidden needed-5]$ cat main.c
extern void foo ();
int
main ()
{
foo ();
return 0;
}
address@hidden 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
address@hidden 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 ld/6853] New: --as-needed doesn't work on more than 1 DSO,
hjl dot tools at gmail dot com <=