This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

RE: Linker options for dividing flash


> -----Original Message-----
> From: DJ Delorie [mailto:dj@redhat.com]
> Sent: Tuesday, April 03, 2007 11:17 PM
> To: Kishore, Jonnalagadda (IE10)
> Cc: binutils@sourceware.org
> Subject: Re: Linker options for dividing flash
> 
> 
> > Is this what you refer to? Ie. I set RAMSTART, RAMSIZE
> > etc. individually for each of the three sections? I've never tried
> > this, so can I invoke the linker command with something like:
> >
> > <target>-ld -DRAMSTART=0x400 ...
> 
> If you look in the Makefile, you'll see I use a sed script
> to change those text markers to real numbers in separate files.
> I.e.:
> 
> sed s/ROMSTART/0xf000/g < template.ld > block1.ld
> sed s/ROMSTART/0xe000/g < template.ld > block2.ld
> sed s/ROMSTART/0xc000/g < template.ld > block3.ld
> 
> > And RAMSTART gets substituted in the linker script?
> 
> The script I use replaces many variables, that's one of them.  It's
> done at libgloss build time, not by the linker.

Thanks. One of the problems I have is that the source tree I work with
builds for several boards and architectures (and compilers) and I want
to avoid maintaining several linker scripts. I am now considering making
two linker scripts; one each for RAM load and FLASH load. These remain
common to all boards and platforms. Then for each platform I will only
provide the respective memory map files for RAM and FLASH which should
be used by the main linker script.

Is this possible? I can manage platform specific include paths with the
makefiles.

Warm regards,
Kishore


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