aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-05-18 10:11:47 +0100
committerNick Clifton <nickc@redhat.com>2016-05-18 10:11:47 +0100
commitd1f70bdcab6cffce423617c6e081a5128d9dabe0 (patch)
tree730248b9de4669940b019f29f6fb71a1fb9c07ac /ld/scripttempl
parent7f9919700d0023db7d66fee9f437251a263f5d53 (diff)
downloadgdb-d1f70bdcab6cffce423617c6e081a5128d9dabe0.zip
gdb-d1f70bdcab6cffce423617c6e081a5128d9dabe0.tar.gz
gdb-d1f70bdcab6cffce423617c6e081a5128d9dabe0.tar.bz2
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.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elf32msp430.sc2
-rw-r--r--ld/scripttempl/ft32.sc18
2 files changed, 12 insertions, 8 deletions
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 <<EOF
.MSP430.attributes 0 :
diff --git a/ld/scripttempl/ft32.sc b/ld/scripttempl/ft32.sc
index 5f5df22..bc55d10 100644
--- a/ld/scripttempl/ft32.sc
+++ b/ld/scripttempl/ft32.sc
@@ -14,13 +14,12 @@ OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
${LIB_SEARCH_DIRS}
-PROVIDE( __PMSIZE = 256K );
-PROVIDE( __RAMSIZE = 64K );
-
MEMORY
{
- flash (rx) : ORIGIN = 0, LENGTH = __PMSIZE
- ram (rw!x) : ORIGIN = 0x800000, LENGTH = __RAMSIZE
+ /* Note - we cannot use "PROVIDE(len)" ... "LENGTH = len" as
+ PROVIDE statements are not evaluated inside MEMORY blocks. */
+ flash (rx) : ORIGIN = 0, LENGTH = 256K
+ ram (rw!x) : ORIGIN = 0x800000, LENGTH = 64K
}
SECTIONS
{
@@ -35,14 +34,14 @@ SECTIONS
. = ALIGN(4);
} ${RELOCATING+ > 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 <<EOF
}
EOF