This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Linking with -lc


On Thu, May 08, 2003 at 09:55:12AM -0400, Harris, Jeff wrote:
> I am having difficulties trying to create a test case other than the -lc
> linking on ppc.
> 
> I do have more information regarding the symbols that were generated which
> may shed some more light.  The output of nm on the shared library
> (optionally linked against libc) and the exe (linked against the shared
> library) show different symbol types for the __muldf3 symbol.  The four
> cases I have are old/new binutils and with/without linking to -lc.
> 

I found a testcase:

# make
cc -fPIC   -c -o main.o main.c
cc -fPIC   -c -o ref.o ref.c
cc -fPIC   -c -o foo.o foo.c
ld -o foo.so -shared --version-script=foo.v foo.o -rpath .
cc    -c -o hidden.o hidden.c
ar rv hidden.a hidden.o
a - hidden.o
ld -o ref.so -shared ref.o foo.so hidden.a -rpath .
cc -o main main.o ref.so hidden.a foo.so
ref.so: undefined reference to `foo@VERS.0'
collect2: ld returned 1 exit status
make: *** [main] Error 1

I will fix that.


H.J.

Attachment: bug.tar.gz
Description: GNU Zip compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]