From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17546 invoked by alias); 14 Sep 2005 21:20:08 -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 16994 invoked by uid 22791); 14 Sep 2005 21:18:10 -0000 Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.207) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 14 Sep 2005 21:18:10 +0000 Received: by wproxy.gmail.com with SMTP id 68so101014wri for ; Wed, 14 Sep 2005 14:18:01 -0700 (PDT) Received: by 10.54.5.38 with SMTP id 38mr1157856wre; Wed, 14 Sep 2005 07:05:47 -0700 (PDT) Received: by 10.54.16.78 with HTTP; Wed, 14 Sep 2005 07:05:47 -0700 (PDT) Message-ID: <24389fb305091407052bf6c45b@mail.gmail.com> Date: Wed, 14 Sep 2005 22:16:00 -0000 From: shreyas krishnan Reply-To: shreyas76@gmail.com To: DJ Delorie Subject: Re: Address assignment Cc: dave.korn@artimi.com, binutils@sources.redhat.com In-Reply-To: <200509141316.j8EDGj2h015594@greed.delorie.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200509141316.j8EDGj2h015594@greed.delorie.com> X-SW-Source: 2005-09/txt/msg00159.txt.bz2 Thanks Delorie, your solutions works. I just need to follow the lcomm/comm/any other directive with the address assignment. I wasnt aware you could do some thing like that hence my confusion. But what can you do to place functions, can such an assigment be used again? I found some other directives like .org but that seems to advance the pointer for ever, I only want to be able to change the address for some functions. regards shrey=20 On 9/14/05, DJ Delorie wrote: >=20 > > Ah, you're using a compiler rather than writing assembly? >=20 > You use the compiler to define the structure, and assembly to place > it. >=20 > > >> .global _my_struct > > >> _my_struct =3D 0xa0001028 > > > > you'd want to use a pointer variable: > > > > struct my_struct_type * const my_struct =3D (struct my_struct_type > > *)0xa0001028; >=20 > Why add an unneeded level of indirection? Especially on time-critical > embedded systems? >