Address assignment
DJ Delorie
dj@redhat.com
Wed Sep 14 16:50:00 GMT 2005
> 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?
More information about the Binutils
mailing list