This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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]

gcc section maping ROM/RAM for embedded target


Hello

I am compiling for an embedded target, and am considering the ROM/RAM
mapping of sections (bss and data in RAM, certain rodata in RAM,
others left in flash).

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.

Then when linking, my linker script would have directed the symbols to
different areas of the memory map sections.

-- Current workaround seems to be setting attributes on every function
and variable in all the C files in each module that needs separating.

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!

I am using a gcc 4.5 toolchain.

Please include my email address in any replies.

Best regards, Jon


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