public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* MEMORY commands in link scripts
@ 2004-11-05 11:59 Jon Beniston
  2004-11-05 12:55 ` Dave Korn
  0 siblings, 1 reply; 6+ messages in thread
From: Jon Beniston @ 2004-11-05 11:59 UTC (permalink / raw)
  To: binutils

Hi,

Is there any way to either use non-constants for the ORIGIN or LENGTH values
in a MEMORY command, or some how access these values else where in a link
script. What I would like to be able to do is, something like:

base = 0x100;
size = 0x100;

MEMORY {
  ram (rw) : ORIGIN = base, LENGTH = size;
}

...

SECTIONS {
   PROVIDE(_fstack = base + size - 4)
}

Or, alternatively:

SECTIONS {
   PROVIDE(_fstack = ORIGIN(ram) + LENGTH(ram) - 4)
}

To put it another way, I would like to be able to override the size /
position of a memory from the command line.

Cheers,
Jon


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-11-19  9:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-05 11:59 MEMORY commands in link scripts Jon Beniston
2004-11-05 12:55 ` Dave Korn
2004-11-05 13:26   ` Jon Beniston
2004-11-08  8:46     ` Nick Clifton
2004-11-08 11:51       ` Jon Beniston
2004-11-19  9:31         ` Nick Clifton

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