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


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


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