Strange LMA/VMA behavior with regions
Fri May 13 04:15:00 GMT 2011
On 13 May 2011 09:10, Alan Modra <firstname.lastname@example.org> wrote:
> 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.
Oops. I have missed that. Point taken.
In the process of verifying further, I have changed the linker script
by removing 'AT>' , still same output is observed.
1 .text_os 00000008 80000008 80000002 00000408 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
I am not specifying any LMA in this case but still I get the current
location for the LMA (Is this also expected?)
( However, if I don't specify VMA using '>', both LMA and VMA are
equal. Please find custom linker script attached for your convenience.
-------------- next part --------------
/* Default linker script, for normal executables */
/* Do we need any of these for elf?
__DYNAMIC = 0; */
FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 512K
} >FLASH AT>FLASH
.text_os ALIGN(8) :
*(.text .text.* )
} > FLASH
More information about the Binutils