This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, avr] Don't forcibly set .text's LMA to zero in avrtiny.sc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]