This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: Strange LMA/VMA behavior with regions
>On Fri, May 13, 2011 at 08:14:19AM +0530, Anitha Boyapati wrote:
>> This is a bug.
>
>No, it is not. Your script sets the VMA in two ways, an address on
>the output section, *and* by specifying a region with '>'. The
>address overrides the region, so that is what you get for VMA. You
>are setting the LMA by specifying a region with 'AT>', so you get the
>current address of the region for LMA.
>
>If you want different behaviour you're going to have to spend time
>writing a patch for ld, and then convince maintainers that your change
>won't break other people's ld scripts.
>
I think the same logic given in para(1) is applicable to Case 2 discussed earlier. The relevant portion from linker script for Case 2 is:
.text_os : ALIGN(8) {
...
} >FLASH AT>FLASH
As I understand it, the address returned by ALIGN(8) has overridden both '>FLASH' and 'AT>FLASH'. While in case 1, ALIGN(8) has overridden only '>FLASH'. It is confusing to see different results.
Thanks for the conversations Alan.
Anitha