This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: MEMORY commands in link scripts


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.

Attachment: mem_origin_and_length.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]