From d1f70bdcab6cffce423617c6e081a5128d9dabe0 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 18 May 2016 10:11:47 +0100 Subject: [PATCH] Fix lots of linker testsuite failures for the FT32 target. * scripttempl/ft32.sc: Use fixed constants for memory region lengths. Include DWARF debug sections. (.data .bss): Do not assign locations during relocatable links. * testsuite/ld-elf/compressed1d.d: Skip for FT32. * testsuite/ld-elf/sec-to-seg.exp: Likewise. * testsuite/ld-elf/sec64k.exp: Likewise. * testsuite/ld-elf/init-fini-array.d: XFail for FT32. * testsuite/ld-elf/merge.d: Likewise. * testsuite/ld-elf/orphan-region.d: Likewise. * testsuite/ld-elf/orphan.s: Likewise. * testsuite/ld-elf/orphan3.d: Likewise. * testsuite/ld-elf/pr349.d: Likewise. * testsuite/ld-elf/warn2.d: Likewise. * testsuite/lib/ld-lib.exp (check_shared_lib_support): Note that the FT32 does not support shared libraries. --- ld/ChangeLog | 18 ++++++++++++++++++ ld/scripttempl/elf32msp430.sc | 2 +- ld/scripttempl/ft32.sc | 18 +++++++++++------- ld/testsuite/ld-elf/compressed1d.d | 2 +- ld/testsuite/ld-elf/init-fini-arrays.d | 4 ++-- ld/testsuite/ld-elf/merge.d | 2 +- ld/testsuite/ld-elf/orphan-region.d | 2 +- ld/testsuite/ld-elf/orphan.d | 2 +- ld/testsuite/ld-elf/orphan3.d | 2 +- ld/testsuite/ld-elf/pr349.d | 2 +- ld/testsuite/ld-elf/sec-to-seg.exp | 1 + ld/testsuite/ld-elf/sec64k.exp | 6 ++++-- ld/testsuite/ld-elf/warn2.d | 2 +- ld/testsuite/lib/ld-lib.exp | 1 + 14 files changed, 45 insertions(+), 19 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index e50b318..4dabdf8 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,21 @@ +2016-05-18 Nick Clifton + + * scripttempl/ft32.sc: Use fixed constants for memory region + lengths. Include DWARF debug sections. + (.data .bss): Do not assign locations during relocatable links. + * testsuite/ld-elf/compressed1d.d: Skip for FT32. + * testsuite/ld-elf/sec-to-seg.exp: Likewise. + * testsuite/ld-elf/sec64k.exp: Likewise. + * testsuite/ld-elf/init-fini-array.d: XFail for FT32. + * testsuite/ld-elf/merge.d: Likewise. + * testsuite/ld-elf/orphan-region.d: Likewise. + * testsuite/ld-elf/orphan.s: Likewise. + * testsuite/ld-elf/orphan3.d: Likewise. + * testsuite/ld-elf/pr349.d: Likewise. + * testsuite/ld-elf/warn2.d: Likewise. + * testsuite/lib/ld-lib.exp (check_shared_lib_support): Note + that the FT32 does not support shared libraries. + 2016-05-17 H.J. Lu * testsuite/lib/ld-lib.exp (at_least_gcc_version): Check diff --git a/ld/scripttempl/elf32msp430.sc b/ld/scripttempl/elf32msp430.sc index b0a6624..17bcb36 100644 --- a/ld/scripttempl/elf32msp430.sc +++ b/ld/scripttempl/elf32msp430.sc @@ -313,7 +313,7 @@ SECTIONS .comment 0 : { *(.comment) } EOF -source $srcdir/scripttempl/DWARF.sc +. $srcdir/scripttempl/DWARF.sc cat < flash} ${CONSTRUCTING+${TORS}} - .data : AT (ADDR (.text) + SIZEOF (.text)) + .data : ${RELOCATING+ AT (ADDR (.text) + SIZEOF (.text))} { *(.data) *(.rodata) *(.rodata*) ${RELOCATING+ _edata = . ; } } ${RELOCATING+ > ram} - .bss SIZEOF(.data) + ADDR(.data) : + .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} : { ${RELOCATING+ _bss_start = . ; } *(.bss) @@ -61,5 +60,10 @@ SECTIONS { *(.stabstr) } +EOF + +. $srcdir/scripttempl/DWARF.sc + +cat <