gcc linkerscript, sections

peter.o.mueller at gmx.de peter.o.mueller at gmx.de
Thu Feb 15 09:30:56 UTC 2001


I have to reuse some old code from a system where one can specify the
location of variables in memory in the following way:

hardware_base .BLKB	0
var1     .BLKB	1
var2     .BLKB	1
var_array     .BLKB	19
var3     .BLKB	1

The whole stuff is placed in an own section and the linker puts it to the
right address. 
Example: hardware_base is located at the beginning of the section, but no
space is reserved. var1 is located also at the beginning, and is 1 byte long.
var2 is located at hardware_base + 1 ...
One can also reserve blocks of bytes (like in var_array).

Is there some doku how to place a whole file or a bunch of variables in an
own section using a linker script? Can one do something shown above with

Thank you very much,

Sent through GMX FreeMail - http://www.gmx.net

More information about the users mailing list