How to add support for different memory section

Ian Lance Taylor ian@wasabisystems.com
Mon Oct 20 15:55:00 GMT 2003


vikas kesarwani <vikaskesarwani@yahoo.com> writes:

> I am working on GAS and ld for a mips variant that has
> special data caches. Programmer may want to keep
> certain data in certain special memory for whatever
> reasons. Now I intend to add support for these
> sections in GAS and accordingly do the same in ld too.
> I am using mips-elf as my target. Can i do it using
> elf sections and how can I generate elf sections? Or
> should I be doing it as support for say .sdata is done
> in mips. Can anybody provide me pointer in how to
> proceed on this.

I think the simplest method would be to put that data in special
sections.  You can do this in the compiler using attributes, or in the
assembler using .section directives.  See the documentation.

You will want to modify the linker script to put those special
sections where you want them in memory.  Again, see the documentation.

Ian



More information about the Binutils mailing list