diff --git a/ld/ChangeLog b/ld/ChangeLog index 783355c137a..180ea03226d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +016-05-17 Senthil Kumar Selvaraj + + * scripttempl/avr.sc (text): Place .progmem.data from avr-libc + above .progmem*. + * scripttempl/avrtiny.sc (text): Likewise. + 2016-05-17 Maciej W. Rozycki * testsuite/ld-unique/unique.exp: Use `is_elf_format' and diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc index c26f4ead94d..010b218c538 100644 --- a/ld/scripttempl/avr.sc +++ b/ld/scripttempl/avr.sc @@ -113,6 +113,10 @@ SECTIONS ${RELOCATING+ *(.trampolines*)} ${CONSTRUCTING+ __trampolines_end = . ; } + /* avr-libc expects these data to reside in lower 64K. */ + ${RELOCATING+ *libprintf_flt.a:*(.progmem.data)} + ${RELOCATING+ *libc.a:*(.progmem.data)} + ${RELOCATING+ *(.progmem*)} ${RELOCATING+. = ALIGN(2);} diff --git a/ld/scripttempl/avrtiny.sc b/ld/scripttempl/avrtiny.sc index 0441dcba930..3f69e9abce4 100644 --- a/ld/scripttempl/avrtiny.sc +++ b/ld/scripttempl/avrtiny.sc @@ -113,6 +113,10 @@ SECTIONS ${RELOCATING+ *(.trampolines*)} ${CONSTRUCTING+ __trampolines_end = . ; } + /* avr-libc expects these data to reside in lower 64K. */ + ${RELOCATING+ *libprintf_flt.a:*(.progmem.data)} + ${RELOCATING+ *libc.a:*(.progmem.data)} + ${RELOCATING+ *(.progmem*)} ${RELOCATING+. = ALIGN(2);}