This is the mail archive of the
mailing list for the binutils project.
Effect of the AT instruction
- From: V S <vsiles83 at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 20 Dec 2017 09:01:21 +0100
- Subject: Effect of the AT instruction
- Authentication-results: sourceware.org; auth=none
I'm trying to understand clearly the behavior of the AT instruction (see
>From my understanding, if I don't specify any AT or AT> to a region, its
LMA will be equal to its VMA.
However in practice, it seems that once I used AT once, the next LMA will
be also affected by it, even
if I don't recall it. Check  for a full example, I'll try to give a
shorter one here:
_text_start = .;
.text : AT(ADDR(.text) - some_offset)
_text_end = .;
. = ALIGN(0x1000);
_rodata_start = .;
.rodata : AT(ADDR(.rodata) - some_offset)
_rodata_end = .;
If I remove the AT instruction of the .rodata section, I still get the same
LMA for .rodata
My understanding is that every action that affects `.` also affects the
underlying LMA, so in this particular
case, only the first AT instance is necessary.
Could anyone confirm that, or point me to the right documentation to
understand what's really happening ?