Comment 1 for bug 654666

Revision history for this message
Matthias Klose (doko) wrote :

http://sourceware.org/ml/binutils/2003-02/msg00417.html

> > 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.