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>> If not, is there any way to produce a version of the binary
> 	 with LMA = VMA for .text and .data, besides relinking with a
> 	 separate linker script?

You can use objcopy to change both the LMA and VMA of sections.

> You might want to try something like this: Note that the MY_ROM_START
> is a SYMBOL - and it is not defined in the linker script, instead
> define it on the linker command line.
> 
> >>   SECTIONS {
> >>     . = MY_ROM_START;
> >>     .vectors : { *(.vectors) }
> >>     . = MY_TEXT_START;
> >>    
> >>     [snip]
> >>   }

If maintaining two separate linker scripts is the concern, you
can put the common stuff in third file that is included by the
ram-specific file and the rom-specific file.

-- 
Grant Edwards
grante@visi.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]