This is the mail archive of the binutils@sourceware.org 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: Address assignment


>   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?


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