MEMORY commands in link scripts

Jon Beniston jbeniston@compxs.com
Mon Nov 8 11:51:00 GMT 2004


Hi,

> > I still think it might be useful have ORIGIN() and LENGTH() 
> functions. 

Attached is a patch that implements these two functions.

Cheers,
Jon

2004-11-08  Jon Beniston <jon@beniston.com>

	* ld/ldlex.l: Allow ORIGIN and LENGTH in EXPRESSION.
	* ld/ldgram.y: Add ORIGIN and LENGTH expressions.
	* ld/ldexp.c (fold_name): Implement LENGTH() and ORIGIN() functions 
	which return the length and origin of a memory.
	* ld/ld.texinfo: Document LENGTH() and ORIGIN() functions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mem_origin_and_length.patch
Type: application/octet-stream
Size: 5593 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20041108/2dec2853/attachment.obj>


More information about the Binutils mailing list