This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld and holes in the address space
- From: Bernd Jendrissek <berndj at prism dot co dot za>
- To: Greg McGary <greg at mcgary dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 2 Oct 2006 23:43:25 +0200
- Subject: Re: ld and holes in the address space
- References: <msy7ryxunz.fsf@mcgary.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, Oct 02, 2006 at 02:41:20PM -0700, Greg McGary wrote:
> I have an employer who desires that ld be able to populate the .text
> address space around "holes". The addresses and sizes of the holes
> will be declared in the linker script.
>
> A naive implementation will fit as many complete objects as possible
> up to a hole's start address, then link the next object after the
> hole's end address.
Until you have your perfect solution, will it help to use GCC's
- -ffunction-sections or the equivalent in whatever compiler you're using?
I don't know if one could do what you want safely in the general case.
Maybe if you teach the compiler to emit relocs that say "it's safe to
jump over a hole here", and then teach the linker to put those spanning
jumps there?
- --
A PC without Windows is like ice cream without ketchup.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)
Comment: Please fetch my new key 804177F8 from hkp://wwwkeys.eu.pgp.net/
iD8DBQFFIYfwwyMv24BBd/gRAldWAJ9EqeDfdpGx0j6lNJ+5qflYvz8WoQCePf6Z
RosI/rVGttStPoFunQIbtAw=
=lUTg
-----END PGP SIGNATURE-----