testing out incompatible glibc with shared executables...possible? SOLVED
Ken Whaley
ken@believe.com
Fri Apr 27 19:28:00 GMT 2001
Thanks, that does it. I had another problem as well (-fPIC and -shared
are wrong to give to gcc when building an executable, that's why I seg
faulted, duh). For the record, here's the makefile that allows this
all to work:
testglibc = /usr/local/glibc2.2.3
gcc = gcc
.PHONY: all
all: hello
hello: hello.o
ÃÂ $(gcc)ÃÂ -Wl,--dynamic-linker=$(testglibc)/lib/ld-linux.so.2 \
ÃÂ ÃÂ -B$(testglibc)/lib/ \
ÃÂ ÃÂ -Wl,-rpath=$(testglibc)/lib \
ÃÂ ÃÂ $< -o $@
hello.o: hello.c
ÃÂ $(gcc) -c -g -O0 -I$(testglibc)/include $< -o $@
Ken
> -----Original Message-----
> From: libc-alpha-owner@sources.redhat.com
> [ mailto:libc-alpha-owner@sources.redhat.com]On Behalf Of Andreas Jaeger
> Sent: Thursday, April 26, 2001 10:49 PM
> To: Ken Whaley
> Cc: libc-alpha@sourceware.cygnus.com
> Subject: Re: testing out incompatible glibc with shared
> executables...possible?
>
>
> "Ken Whaley" <ken@believe.com> writes:
>
> > I'm trying to build and run a dynamically shared executable based on
> > an install of a "test" build of glibc (2.2.1 in this case) on a
> x86-linux
> > system (redhat 6.2) based on glibc 2.1.x. I'm using gcc
> 2.95.2. I've read
> > the glibc FAQ, and didn't find any usable solution in there.
> >
> > The static build runs fine, but I can't get the shared version of a
> > hello world app to work (it links w/out error but seg faults when run
> > (the glibc 2.1.x gdb on the system is of no help in debugging it, no
> > surprise there)).
>
> Add -Wl,--dynamic-linker=/usr/local/testglibc2.2.1/lib/ld-linux.so.2
>
> Andreas
> --
> Andreas Jaeger
> SuSE Labs aj@suse.de
> private aj@arthur.inka.de
> http://www.suse.de/~aj
>
More information about the Libc-alpha
mailing list