A visibility bug with common symbol

H. J. Lu hjl@lucon.org
Wed Mar 5 23:30:00 GMT 2003


We don't treat common symbol as definition. It causes a problem with
visibility. Here is a testcase:

# make
cc -O -g -B./ -DDEFINE -fPIC -c main.c
cc -shared -o libfoo.so -O -g -B./ -DDEFINE shared.c
cc -o foo -O -g -B./ -DDEFINE main.o libfoo.so -Wl,-rpath,.
./ld: main.o(.text+0x1b): unresolvable relocation against symbol `short_hidden_ref_norm_def'
collect2: ld returned 1 exit status
make: *** [foo] Error 1

H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.tar.gz
Type: application/x-gzip
Size: 538 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030305/3012442d/attachment.bin>


More information about the Binutils mailing list