Fixing load address to eliminate local dynamic relocs

Doug Kwan (關振德) dougkwan@google.com
Thu Oct 23 20:59:00 GMT 2008


The prelinker looks closer than ld to what I want. I understand that a
shared library will fail to load if it required address is not
available but the intended application is on a very well-controlled
environment.

-Doug

2008/10/23 Ian Lance Taylor <iant@google.com>:
> ""Doug Kwan (關振德)"" <dougkwan@google.com> writes:

> There isn't any support for that in GNU ld, no.  The GNU/Linux prelink
> program (not part of the GNU binutils) will give a shared library a
> default address, but it won't remove the dynamic relocs; they remain,
> and are used if the default address was not available.  So perhaps you
> could modify prelink to also discard dynamic relocs.  Then of course
> your shared library would fail at load time if the required address
> space were not available.


More information about the Binutils mailing list