This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: Cross debugger and load address (want download to VMA, not LMA)


Toralf:


Toralf Lund wrote:


Bill Gatliff wrote:

Toralf:


I usually just have two linker command scripts: one for flash, one for RAM. They differ only in their specifications for LMA.


Yeah, maybe that's not so bad... I generally fear such solutions, as I know from experience that when you maintain two files that's supposed to contain the same information, you'll sooner or later edit one of them and forget about the other. But, I can of course do something like

%.dbg.ld: %.ld
   $(RM) $@
   @echo "/* *** GENERATED, do not edit (consult $< instead) */" > $@
   sed "s/AT[[:space:]]*>.*//" < $< >> $@

in (GNU) make to avoid such issues...


Yep. Or even have a ld.x.in file with "macros" in it, that you feed through gcc's preprocessor to produce an ld.x. Different macro definitions yield a different linker command file.

Six of one, half-dozen of the other. Both ways are better than maintaining two truly separate linker command scripts, tho.

b.g.

--
Bill Gatliff
Embedded GNU, Linux, and other board support packages.
bgat@billgatliff.com



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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