This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ld and holes in the address space
- From: Greg McGary <greg at mcgary dot org>
- To: binutils at sources dot redhat dot com
- Cc: greg at mcgary dot org
- Date: 02 Oct 2006 14:41:20 -0700
- Subject: ld and holes in the address space
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.
A complex implementation for code would will right up to a hole's
start address, possibly splitting an object across the hole and
inserting a jump to span the hole. (Obviously, data can't be split
across holes). The complex implementation has many thorny problems on
machines that have short- and long-displacement branches, as this
employer's CPU has. I prefer not to open that can of worms.
Has anything like this been contemplated before? If I implement this,
what are the chances that the maintainers will want this feature?
Greg