http://sourceware.org/bugzilla/show_bug.cgi?id=15146
Bug #: 15146
Summary: Reference from dummy plugin symbol isn't removed
Product: binutils
Version: 2.24 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
[hjl@gnu-6 pr15126]$ cat foo.c
int main() { }
[hjl@gnu-6 pr15126]$ cat bar.c
extern int xxx;
int
bar ()
{
return xxx;
}
[hjl@gnu-6 pr15126]$ cat xxx.c
int xxx __attribute__ ((weak)) = 3;
[hjl@gnu-6 pr15126]$ cat yyy.c
[hjl@gnu-6 pr15126]$ make
gcc -flto -c -o bar.o bar.c
gcc -flto -c -o foo.o foo.c
gcc -shared -fPIC -o libxxx.so xxx.c
gcc -shared -fPIC -o libyyy.so yyy.c libxxx.so
gcc -flto -O2 -o x bar.o foo.o libyyy.so -Wl,-rpath-link,.
/usr/local/bin/ld: bar.o (symbol from plugin): undefined reference to symbol
'xxx'
/usr/local/bin/ld: note: 'xxx' is defined in DSO ./libxxx.so so try adding it
to the linker command line
./libxxx.so: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [x] Error 1
--
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
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils