This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: libiberty...
> Date: Fri, 19 Nov 1999 15:19:25 -0500
> From: Scott Bambrough <scottb@netwinder.org>
> The dynamic linker cannot fix this up. To do so it would have to write
> to the code segment, which is read only. If the code was compiled with
> -fpic, the reloc generated would have been a PLT32 reloc. Then the
> linker would have allocated a GOT entry, and a PLT entry for the
> symbol. Since it wasn't no PLT and GOT entries are available for the
> dynamic linker to use.
For an example of how to do this, see the ppc dynamic linker in
glibc.
Since there was no -fpic support in gcc (well, it was there but it was
no good) when I started writing it, I'm pretty sure that it all works,
or at least it used to work. There are some circumstances where not
using -fpic will actually produce a performance improvement.
--
Geoffrey Keating <geoffk@cygnus.com>