From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6242 invoked by alias); 5 Nov 2004 11:59:27 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 6234 invoked from network); 5 Nov 2004 11:59:26 -0000 Received: from unknown (HELO smtp003.mail.ukl.yahoo.com) (217.12.11.34) by sourceware.org with SMTP; 5 Nov 2004 11:59:26 -0000 Received: from unknown (HELO Kindrogan) (compxsuk@81.136.112.227 with login) by smtp003.mail.ukl.yahoo.com with SMTP; 5 Nov 2004 11:59:24 -0000 Reply-To: From: "Jon Beniston" To: Subject: MEMORY commands in link scripts Date: Fri, 05 Nov 2004 11:59:00 -0000 Organization: CompXs Message-ID: <000d01c4c32e$e2a25d60$0bbda8c0@Kindrogan> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2004-11/txt/msg00099.txt.bz2 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 =3D 0x100; size =3D 0x100; MEMORY { ram (rw) : ORIGIN =3D base, LENGTH =3D size; } ... SECTIONS { PROVIDE(_fstack =3D base + size - 4) } Or, alternatively: SECTIONS { PROVIDE(_fstack =3D 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