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: Resetting LMA for new VMAs


Alan Modra wrote:
On Sat, Apr 05, 2008 at 07:11:43PM +0100, Nathan Sidwell wrote:

or rather the manual says the LMA spacing matches the VMA spacing, but does not mention this surprise if you set the VMA but not the LMA.

But your example script *does* set LMAs. I don't see why you think that the new linker behaviour is any more surprising than the old.

I guess it depends on one's mental model of the linker internals. Also, as there doesn't appear to be a tescase to check this behaviour, I wondered if it was an intentional design consequence.


Getting back to overlays, suppose I have a script that specifies
overlays and thus the section lma is greater than section vma for
every section past the end of the overlay region.  If I happen to set
vma for one of these sections, say to leave a gap, then your patch
would set lma back to vma, potentially overlapping some previous
section.  Note that this imaginary overlay script doesn't currently
need to set lma anywhere.

Yes, I see that. thanks for the example. I'll tell the customer to change their linker script.


nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery


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