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