ld bug with -Bsymbolic --noinhibit-exec (2.9.1.0.990418-1c)

Eric Ding ericding at applix.com
Thu Jun 17 07:14:25 EST 1999


>>>>> Franz Sirl <Franz.Sirl-kernel at lauterbach.com> writes:

> Hmm, I browsed thru the binutils code and didn't see anything suspicious. Is
> there any chance you can strip that down to a small testcase with a few
> symbols? That would help debugging a lot.

Sure can.  Create a file (let's call it foo.c)... it just contains:

     int foo_tester()
     {
          return(twenty());
     }

Then run the following:

     gcc -fPIC -c foo.c

After the compilation, run:

     gcc -shared -o libfoo.so foo.o
     gcc -shared -Wl,-Bsymbolic -o libfoo.so foo.o
     gcc -shared -Wl,--noinhibit-exec -Wl,-Bsymbolic -o libfoo.so foo.o

On Intel, the first succeeds, the second fails (as expected), and the
third succeeds in building a .so file, even with the "undefined
reference" error.

On PPC, the first succeeds, but the second and third both fail.

Eric
-- 
Senior Software Engineer / ericding at applix.com               <><
Applix, Inc. / 112 Turnpike Road / Westboro MA 01581-2842

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]





More information about the Linuxppc-dev mailing list