This is the mail archive of the 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]

Re: NEW PATCH: Handle undefined symbol in DSO from DT_NEEDED

On Wed, May 09, 2001 at 03:53:21PM -0700, H . J . Lu wrote:
> > 
> > Are you sure it does not work or is it just a guess?
> > I've just compiled a program using atexit on a glibc 2.0.7 system (RHL 5.2),
> > plus a program using shared library which uses atexit on the same box, moved
> > them to glibc 2.2.3 box (both the program and DSO have unversioned atexit
> > reference, glibc has atexit@GLIBC_2.0 only) and they work very well.
> > Anyway, if you show me a testcase which would not work, then I should put
> I have a testcase. I will post it later.

I am enclosing a testcase here.

# make
cc    -c -o foo.o foo.c
cc -fPIC -c b.c
cc -fPIC -c a.c
cc -fPIC -c c.c
cc -shared -o c.o
cc -shared -o a.o
cc -shared -o b.o
cc -o foo foo.o -Wl,-rpath,.
cc -fPIC -c c1.c
cc -Wl,-soname, -Wl, -shared -o c1.o
cc -fPIC -c c2.c
cc -Wl,-soname, -Wl, -shared -o c2.o
cc -o default foo.o -Wl,-rpath,.
./ undefined reference to `bar'
collect2: ld returned 1 exit status

./ is never mentioned in the command line.



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