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)


Grant:



Grant Edwards wrote:

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.



Does that work for code that isn't position-independent, though? (I haven't tried this in a while)


For example, one can envision an extreme case where they use objcopy on an S-Record file to move the LMA, and the first branch instruction in the program goes back to the old address...


b.g.


--
Bill Gatliff
In the dark on embedded Linux?  Step into the light.
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]