Prelinking relative relocations in shared objects

Jakub Jelinek jakub@redhat.com
Thu Sep 5 11:32:00 GMT 2002


On Thu, Sep 05, 2002 at 07:24:07PM +0100, Jan Vroonhof wrote:
> > The relocations probably exist because the ELF linking rules permit
> > overriding a symbol in a shared library.  Therefore, all references to
> > global symbols from a shared library require a relocation, whether the
> > symbol is defined in the same shared library or not.
> 
> Yes, I know. However this shared library almost only contains one big object
> that is linked using -r from multiple objects and thus such rules do not apply.

Have you tried making the symbols which should not be exported
from the shared library .hidden in assembly or hide them through (possibly
anonymous) version script?
You can also have a look at prelink
(ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/prelink-0.2.0-8.src.rpm).

	Jakub



More information about the Binutils mailing list