This is the mail archive of the binutils@sourceware.org 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: ld and holes in the address space


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


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