From mboxrd@z Thu Jan 1 00:00:00 1970 From: hjl@nynexst.com (H.J. Lu) To: eric@aib.com (Eric Youngdale) Cc: gas2@cygnus.com Subject: Re: X11R5/ELF build, was: bugs in gas-940912elf.1.tar.gz and gcc-2.6.0-940923.elf Date: Sat, 01 Oct 1994 09:10:00 -0000 Message-id: <9410011609.AA23991@titanic.nynexst.com> References: X-SW-Source: 1994/msg00122.html > >I am not sure if it is a GNU ld bug or the Linux d-linker bug. > >I checked it on a UnixWare. It worked as expected. I think > >The Linux d-link should bind the undefined function symbols in > >the non PIC executable to the PLT address. I will be out o > >f town until next Wendesday. I will take a look then if you > >don't have the time. > > My main machine is here at aib, but I need to find a 10baseT > cable to connect it. Once I do this, I should be able to say better > what the problem is. > > In general, the dynamic loader will be binding symbols to > whatever address appears within the symbol table of the shared object. > This tends to be the actual address of the symbol, and not the PLT > address. I made the decision to do it this way because the > performance will be a little bit better this way, but as you say, the > comparison tests will fail. I had thought that I set things up the > same way that Unixware does, but it would be relatively easy to change > the dynsym section so that it points to the PLT entry instead of the > function itself. Eric, I was wrong in my previous mail. It looks the function address printed out in the shared library is invalid. I asseum either there is no entry in GOT or the entry is wrong. > > -Eric > > I am sending the test to the gas2 list. It looks like the bug can be in ld and/or d-linker. I want to first make sure the GNU ELF ld does the right thing. I was wondering if anyone has the GNU ELF ld running on a SVR4/x86 box. I would appreciate he/she could run the test included here. You can unpack the tar file and do cd elf vi Makefile # for CC and how to build the shared library make make runtest Under i486-linux, the address of the function in the shared library is printed out wrong. It looks like there is no entry for that function in the GOT. But if I compile main.c with -fPIC and link main.o against the shared library, the entry is there. It seems the d-linker failed to build an entry for that function. But the global variable is ok. -- H.J. Lu NYNEX Science and Technology, Inc. hjl@nynexst.com ----- begin 644 elf.tar.gz M'YV09=B8>0&@H,&#"!,J7,BPH<.'$!&"F'BC1@T0 ";&L''#!L:)&F5\!$ER M(HR)-6S0D'$CQ@P8-BY2M.$R8XV(.'/JW,D30)TY=,+(F0@ C1HV/1D"#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