public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RFC: sections that explicitly have no VMA
@ 2006-08-29 12:45 Simon Richter
  0 siblings, 0 replies; only message in thread
From: Simon Richter @ 2006-08-29 12:45 UTC (permalink / raw)
  To: binutils

Hello,

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
certain VMA.

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

Questions? Comments?

   Simon

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-29 11:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-29 12:45 RFC: sections that explicitly have no VMA Simon Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).