Resetting LMA for new VMAs
Sun Apr 6 08:31:00 GMT 2008
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
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
More information about the Binutils