This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch, avr] Don't forcibly set .text's LMA to zero in avrtiny.sc
- From: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: Denis Chertykov <chertykov at gmail dot com>, Nick Clifton <nickc at redhat dot com>
- Date: Mon, 25 Apr 2016 16:14:08 +0530
- Subject: [Patch, avr] Don't forcibly set .text's LMA to zero in avrtiny.sc
- Authentication-results: sourceware.org; auth=none
The linker script template used for the tiny arch (avrtiny.sc)
explicitly sets the LMA of the .text output section to 0. This prevents
the LMA from changing when --section-start is used to make .text go to a
different address - only the VMA changes and the image ends up in the
wrong location in flash.
This trivial patch removes the AT keyword so that .text gets the same
address for both LMA and VMA when --section-start=.text=<address> is specified.
This also makes it in line with avr.sc, the other linker script template.
If this is ok, could someone commit please? I don't have commit access.
Regards
Senthil
ld/ChangeLog
2016-04-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* scripttempl/avrtiny.sc (.text): Do not set LMA to zero.
diff --git a/ld/scripttempl/avrtiny.sc b/ld/scripttempl/avrtiny.sc
index 045bc4b..af0792f 100644
--- a/ld/scripttempl/avrtiny.sc
+++ b/ld/scripttempl/avrtiny.sc
@@ -96,7 +96,7 @@ SECTIONS
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
/* Internal text space or external memory. */
- .text ${RELOCATING-0} : ${RELOCATING+ AT (0x0)}
+ .text ${RELOCATING-0} :
{
*(.vectors)
KEEP(*(.vectors))