This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: How to add support for different memory section
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: vikas kesarwani <vikaskesarwani at yahoo dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 20 Oct 2003 08:55:24 -0700
- Subject: Re: How to add support for different memory section
- References: <20031020084837.68504.qmail@web11901.mail.yahoo.com>
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