This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: PATCH: A symbol version bug


On Fri, May 16, 2003 at 12:12:29AM -0400, Jack Howarth wrote:
> HJ,
>    I built and installed a glibc with your latest libc-base patch...
> 
> http://sources.redhat.com/ml/libc-alpha/2003-05/msg00126.html
> 
> against a binutils with the bfd-base patch applied. The resulting
> glibc passes make check fine. However I have noticed an oddity
> on debian ppc sid with the original test case (which I added
> LD_LIBRARY_PATH=./ to the Makefile to allow the binaries to run)...
> 
> when my system is unprelinked I get...
> 
> cc    -c -o new.o new.c

Please add -fPIC.

> cc -Wl,-soname,libfoo.so,--version-script=foo.v -shared -o libnew.so new.o
> cc    -c -o main.o main.c
> cc -o new libnew.so main.o -Wl,-rpath,
> cc -fPIC   -c -o old.o old.c
> cc -Wl,-soname,libfoo.so -shared -o libold.so old.o
> cc -o old libold.so main.o -Wl,-rpath,
> ln -sf libnew.so libfoo.so
> LD_LIBRARY_PATH=./ ./old
> original_foo
> LD_LIBRARY_PATH=./ ./new
> new_foo
> ln -sf libold.so libfoo.so
> LD_LIBRARY_PATH=./ ./old
> xyz
> LD_LIBRARY_PATH=./ ./new
> ./new: ./libfoo.so: no version information available (required by ./new)
> xyz
> 
> ...which from what I gather in the mailing list is normal unbroken 
> behavior for binutils and glibc. However when I am prelinked I get...
> 
> cc    -c -o new.o new.c
> cc -Wl,-soname,libfoo.so,--version-script=foo.v -shared -o libnew.so new.o
> cc    -c -o main.o main.c
> cc -o new libnew.so main.o -Wl,-rpath,
> cc -fPIC   -c -o old.o old.c
> cc -Wl,-soname,libfoo.so -shared -o libold.so old.o
> cc -o old libold.so main.o -Wl,-rpath,
> ln -sf libnew.so libfoo.so
> LD_LIBRARY_PATH=./ ./old
> ./old: error while loading shared libraries: ./libfoo.so: R_PPC_REL24 relocation at 0x0ffaf8f8 for symbol `printf' out of range
> make: *** [all] Error 127
> 
> Any idea what this is all about?
>                        Jack


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