This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Strange LMA/VMA behavior with regions
- From: Alan Modra <amodra at gmail dot com>
- To: Anitha Boyapati <anitha dot boyapati at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 13 May 2011 09:03:57 +0930
- Subject: Re: Strange LMA/VMA behavior with regions
- References: <BANLkTi=+O9YvCp42jT3k0fKiC4z0opvAdA@mail.gmail.com> <BANLkTinEBMoiGna1KJKn1KqtvNsHdHynoA@mail.gmail.com> <BANLkTi=2H2sxxHfymE0ir4JfMxV+49M_UA@mail.gmail.com>
On Thu, May 12, 2011 at 07:38:59PM +0530, Anitha Boyapati wrote:
> > On Wed, May 11, 2011 at 12:50:31PM +0530, Abnikant Singh wrote:
> >> ? .text_os ALIGN(8) :
> >
> > This says to set the address of the output section .text_os. ?When you
> > set the address, any input section alignment is ignored. ?This happens
>
> I agree that ALIGN() overrides input section alignment. But if we set
> address for VMA using ALIGN(), should it affect LMA too? I think it
> should not.
That would be inconsistent. If you specify an address for an output
section it most certainly should affect both VMA and LMA. After all,
LMA is equal to VMA in the usual case. I see no reason whatsoever to
treat an address that happens to use ALIGN any differently from any
other address.
--
Alan Modra
Australia Development Lab, IBM