bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/2939] ld --cref doesn't work with --as-needed


From: hjl at lucon dot org
Subject: [Bug ld/2939] ld --cref doesn't work with --as-needed
Date: 17 Jul 2006 22:51:14 -0000

------- Additional Comments From hjl at lucon dot org  2006-07-17 22:51 -------
Created an attachment (id=1171)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1171&action=view)
A testcase

I got

address@hidden cref]$ make
gcc -fPIC   -c -o x.o x.c
gcc -fPIC   -c -o y.o y.c
./ld -shared -o liby.so y.o
./ld --cref -shared -o libx1.so x.o -L. \
        --as-needed -ly --no-as-needed

Cross Reference Table

Symbol                                            File
_DYNAMIC                                          x.o
_GLOBAL_OFFSET_TABLE_                             x.o
__bss_start                                       ./liby.so
_edata                                            ./liby.so
_end                                              ./liby.so
_start                                            x.o
./ld: symbol `bar' missing from main hash table
bar                                               ./liby.so
./ld --cref -shared -o libx2.so x.o -L. -ly

Cross Reference Table

Symbol                                            File
_DYNAMIC                                          x.o
_GLOBAL_OFFSET_TABLE_                             x.o
__bss_start                                       ./liby.so
_edata                                            ./liby.so
_end                                              ./liby.so
_start                                            x.o
address@hidden cref]$

The error is

./ld: symbol `bar' missing from main hash table

since bar has been freed because liby.so isn't needed. 

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2939

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]