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


If what you mean is something like "I have this structure, but it exists
at a specific address" you can easily do this in the assembler like this:

	.global _my_struct
_my_struct = 0xa0001028

The linker doesn't care *what* a symbol is, just *where* it is.  The
above gives it an absolute address (it shows up in the "*ABS*"
section) but doesn't allocate any space for it (sorry, no overlap
protection).


If what you mean is "I want code in this block of flash, and data in
this block of RAM" then you want to look up the MEMORY directive for
link scripts in the linker manual ("info ld").  If you download the
latest newlib from CVS and look at libgloss/m32c you'll see a number
of examples of how to manage all that.


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