Address assignment

DJ Delorie dj@redhat.com
Wed Sep 14 19:23:00 GMT 2005


> Thanks Delorie, your solutions works. I just need to follow the
> lcomm/comm/any other directive with the address assignment.

No, take the .lcomm/.comm out completely, if the structure corresponds
to some hardware device.  If you just want to assign some structures
to a chunk of RAM somewhere, use the MEMORY directive instead (no asm
required, see below).

> But what can you do to place functions, can such an assigment be
> used again?

No, this is where the MEMORY link directive comes into play.  You'd
use __attribute__((section(""))) to have gcc put the function in a
named section, then use MEMORY to tell the linker where in memory to
put that section.



More information about the Binutils mailing list