This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: R_PPC_REL24 relocation in shared libraries


> Date: Mon, 24 Feb 2003 21:08:48 +0100
> From: Olaf Hering <olh at suse dot de>

> > 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.
> 
> Ok, what is correct now? Or has this change in the last years?
> http://sources.redhat.com/ml/libc-alpha/2001-06/msg00171.html

The two statements "libraries not compiled with -fpic or -fPIC are not
guaranteed to work" and "Non-PIC code in shared libraries is supposed
to work, most of the time" are not contradictory.  It's supposed to
work most of the time.

The actual constraint is that you can't have more than 16M of object
code and data in your program.  To be precise, you'll get 'out of
range' errors if your process image has two routines that are more
than 16M away from each other.  The most likely reason this might
happen is that your program really is larger than 16M, the second-most
likely is that you've somehow managed to trick glibc's heuristics for
loading shared libraries into loading a library in the wrong place.
The third-most likely reason is complicated and involves weak
symbols.

-- 
- Geoffrey Keating <geoffk at geoffk dot org>


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