public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* A visibility bug with common symbol
@ 2003-03-05 23:30 H. J. Lu
  0 siblings, 0 replies; only message in thread
From: H. J. Lu @ 2003-03-05 23:30 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

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.

[-- Attachment #2: bug.tar.gz --]
[-- Type: application/x-gzip, Size: 538 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-05 23:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-05 23:30 A visibility bug with common symbol H. J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).