This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Address assignment
- From: DJ Delorie <dj at redhat dot com>
- To: dave dot korn at artimi dot com
- Cc: shreyas76 at gmail dot com, binutils at sources dot redhat dot com
- Date: Wed, 14 Sep 2005 09:16:45 -0400
- Subject: Re: Address assignment
- References: <SERRANOjtRpeVPOEcyh0000038f@SERRANO.CAM.ARTIMI.COM>
> Ah, you're using a compiler rather than writing assembly?
You use the compiler to define the structure, and assembly to place
it.
> >> .global _my_struct
> >> _my_struct = 0xa0001028
>
> you'd want to use a pointer variable:
>
> struct my_struct_type * const my_struct = (struct my_struct_type
> *)0xa0001028;
Why add an unneeded level of indirection? Especially on time-critical
embedded systems?