This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: R_PPC_REL24 relocation in shared libraries
Alan Modra <amodra at bigpond dot net dot au> writes:
> On Sun, Feb 23, 2003 at 04:11:46PM +0100, Olaf Hering wrote:
> > the linker does allow R_PPC_REL24 relocations in shared libraries. These
> > relocs come from object files compiled without -fPIC. Code compiled
> > without -fPIC is not supposed to work in shared libraries. I think that
> > is true for every *-linux* architecture, but I'm mainly concerned about
> > powerpc-linux.
>
> Non-PIC code in shared libs is supported by binutils on some other
> architectures, eg x86, so it's reasonable for the gas testsuite to
> check that non-PIC shared libs work. Non-PIC shared libs do have some
> disadvantages. eg. non-PIC shared libs might have relocations in
> read-only segments, causing pages to become unshared, and as you know,
> on powerpc-linux you might also run into problems with branches not
> being able to reach their targets.
Non-PIC code in shared libraries is supposed to work, most of the time
(and certainly well enough for the binutils testsuite) on powerpc-linux.
--
- Geoffrey Keating <geoffk at geoffk dot org>