Address assignment
shreyas krishnan
shreyas76@gmail.com
Wed Sep 14 22:16:00 GMT 2005
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
On 9/14/05, DJ Delorie <dj@redhat.com> wrote:
>
> > 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