public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Anitha Boyapati <anitha.boyapati@gmail.com>
To: Anitha Boyapati <anitha.boyapati@gmail.com>, binutils@sourceware.org
Subject: Re: Strange LMA/VMA behavior with regions
Date: Fri, 13 May 2011 04:15:00 -0000	[thread overview]
Message-ID: <BANLkTinu9jhynFXN=245HjXVe0yWC=cQ4w@mail.gmail.com> (raw)
In-Reply-To: <20110513034039.GA30815@bubble.grove.modra.org>

[-- Attachment #1: Type: text/plain, Size: 1054 bytes --]

On 13 May 2011 09:10, Alan Modra <amodra@gmail.com> 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

Agreed.

> 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.
)


Anitha

[-- Attachment #2: custom_ls.txt --]
[-- Type: text/plain, Size: 509 bytes --]

/* Default linker script, for normal executables */
OUTPUT_FORMAT("elf32-avr32", "elf32-avr32",
	      "elf32-avr32")
OUTPUT_ARCH(avr32:uc)
SEARCH_DIR("/proj/builds/AVR32_REL_3.2.0_build00/install/avr32/lib");
/* Do we need any of these for elf?
   __DYNAMIC = 0;    */
MEMORY
{
    FLASH (rxai!w) : ORIGIN = 0x80000000, LENGTH = 512K
}

/*
PHDRS {

flash PT_LOAD;
}
*/

SECTIONS
{
  .mysec1_os          :
  {
    *(.mysec1)
  } >FLASH AT>FLASH
  .text_os  ALIGN(8) : 
  {
    *(.text .text.* )
  } > FLASH
}

  reply	other threads:[~2011-05-13  4:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BANLkTi=+O9YvCp42jT3k0fKiC4z0opvAdA@mail.gmail.com>
     [not found] ` <BANLkTinEBMoiGna1KJKn1KqtvNsHdHynoA@mail.gmail.com>
2011-05-12 14:09   ` Anitha Boyapati
2011-05-12 23:34     ` Alan Modra
2011-05-13  2:44       ` Anitha Boyapati
2011-05-13  3:41         ` Alan Modra
2011-05-13  4:15           ` Anitha Boyapati [this message]
2011-05-13  5:26             ` Alan Modra
2011-05-13  5:45               ` Boyapati, Anitha
2011-05-13  5:02           ` Boyapati, Anitha
2011-05-13  5:42             ` Alan Modra
2011-05-11  7:20 Abnikant Singh
2011-05-11  7:45 ` Alan Modra
  -- strict thread matches above, loose matches on Subject: below --
2010-11-29 13:15 Sebastian Huber
2010-11-30 17:00 ` Sebastian Huber
2010-12-01 13:13   ` Alan Modra
2010-12-01 15:03     ` Sebastian Huber
2010-12-02  0:46       ` Alan Modra
2010-12-02  8:03         ` Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTinu9jhynFXN=245HjXVe0yWC=cQ4w@mail.gmail.com' \
    --to=anitha.boyapati@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).