gcc section maping ROM/RAM for embedded target
Jon Grant
jg@jguk.org
Fri Oct 7 20:54:00 GMT 2011
Ian Lance Taylor wrote, On 03/10/11 23:57:
> Jon Grant<jg@jguk.org> writes:
>
>> a) I would like to know if is possible to set a section prefix (or
>> suffix) on all symbols. I was hoping to find something like:
>> --section-prefix=module_name ? Then when compiling those object files
>> and creating library my makefile would have passed that argument to
>> gcc.
>
> gcc does not support any such option.
>
> Note that your linker script can assign input sections to output
> sections using the name of the file in which the input section is
> defined. So you may be able to sort things out that way.
Perfect, thank you for this tip.
>> b) is it possible overlay RAM section mapping? e.g. I have a two
>> buffers for two different filesystems that are slightly different
>> sizes. Only one filesystem will ever be active at the same time, so I
>> would like to overlay these in the memory map, so that only the larger
>> of the two areas is visible. Saving the smaller area from the memory
>> map!
>
> Look for OVERLAY in the linker documentation.
Great, thank you.
Regards, Jon
More information about the Gcc-help
mailing list