This is the mail archive of the
mailing list for the binutils project.
RFC: sections that explicitly have no VMA
- From: Simon Richter <Simon dot Richter at hogyros dot de>
- To: binutils at sources dot redhat dot com
- Date: Tue, 29 Aug 2006 13:58:07 +0200
- Subject: RFC: sections that explicitly have no VMA
I had a small thought today: Would it make sense to have a statement in
the linker script language to specify that an output section explicitly
does not have a VMA?
When this flag is applied to an output section, then there may not be
any relocations in the output object that depend on the position of that
section (the difficulty here will be size calculations, obviously), nor
may any relaxations be performed that assume that a section is at a
There are two additional flags that would be useful here:
- "this section may contain relocations to sections without a VMA".
Obviously that would be the PLT/GOT and possibly a few others.
- "this section is relocatable". This would mean that absolute
relocations are okay for this section, and that they should be emitted
into the output file for the runtime linker.
In one of my current projects, I have the case that a few output
sections are "trampolines" that can be loaded at different addresses,
I'd like the linker to enforce that there are no relocations inside that
section. Also, the fact that Windows and uClinux binaries are relocated
after loading would be made explicit in the linker script, so there may
be a possibility of moving code from target specific routines to generic