ld and holes in the address space

Daniel Jacobowitz drow@false.org
Mon Oct 2 22:01:00 GMT 2006

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.

> Has anything like this been contemplated before?  If I implement this, 
> what are the chances that the maintainers will want this feature?

FYI, commercial linkers I've worked with have this feature; you specify
that an input section may be placed in any of a number of output
regions.  This is one of the things that I've always wondered why no
one had ever needed in GNU LD.

For instance, the armlink syntax for this would be something like

L1 0x100000 0x10000 {
  R1 +0 {
    .ANY (+RO)

L2 0x400000 0x20000 {
  R2 +0 {
    .ANY (+RO)

Daniel Jacobowitz

More information about the Binutils mailing list