aboutsummaryrefslogtreecommitdiff
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
parent7f9919700d0023db7d66fee9f437251a263f5d53 (diff)
downloadbinutils-d1f70bdcab6cffce423617c6e081a5128d9dabe0.zip
binutils-d1f70bdcab6cffce423617c6e081a5128d9dabe0.tar.gz
binutils-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.
-rw-r--r--ld/ChangeLog18
-rw-r--r--ld/scripttempl/elf32msp430.sc2
-rw-r--r--ld/scripttempl/ft32.sc18
-rw-r--r--ld/testsuite/ld-elf/compressed1d.d2
-rw-r--r--ld/testsuite/ld-elf/init-fini-arrays.d4
-rw-r--r--ld/testsuite/ld-elf/merge.d2
-rw-r--r--ld/testsuite/ld-elf/orphan-region.d2
-rw-r--r--ld/testsuite/ld-elf/orphan.d2
-rw-r--r--ld/testsuite/ld-elf/orphan3.d2
-rw-r--r--ld/testsuite/ld-elf/pr349.d2
-rw-r--r--ld/testsuite/ld-elf/sec-to-seg.exp1
-rw-r--r--ld/testsuite/ld-elf/sec64k.exp6
-rw-r--r--ld/testsuite/ld-elf/warn2.d2
-rw-r--r--ld/testsuite/lib/ld-lib.exp1
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 <nickc@redhat.com>
+
+ * 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 <hongjiu.lu@intel.com>
* 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 <<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
diff --git a/ld/testsuite/ld-elf/compressed1d.d b/ld/testsuite/ld-elf/compressed1d.d
index 496557d..11d39b7 100644
--- a/ld/testsuite/ld-elf/compressed1d.d
+++ b/ld/testsuite/ld-elf/compressed1d.d
@@ -2,7 +2,7 @@
#as: --compress-debug-sections=none
#ld: -r --compress-debug-sections=zlib-gnu
#readelf: -SW
-#notarget: arc*-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-* i370-*-* i860-*-* iq2000-*-* mn10200-*-* moxie-*-* msp430-*-* mt-*-* or1k-*-* pj-*-*
+#notarget: arc*-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-* ft32-*-* i370-*-* i860-*-* iq2000-*-* mn10200-*-* moxie-*-* msp430-*-* mt-*-* or1k-*-* pj-*-*
# Not all ELF targets use the elf.em emulation...
#failif
diff --git a/ld/testsuite/ld-elf/init-fini-arrays.d b/ld/testsuite/ld-elf/init-fini-arrays.d
index 46b536c..9729518 100644
--- a/ld/testsuite/ld-elf/init-fini-arrays.d
+++ b/ld/testsuite/ld-elf/init-fini-arrays.d
@@ -1,9 +1,9 @@
#source: init-fini-arrays.s
#ld: -r
#readelf: -S --wide
-#xfail: cr16-*-* crx-*-* msp430-*-*
+#xfail: cr16-*-* crx-*-* ft32-*-* msp430-*-*
# msp430 puts the init_array and fini_array inside the .rodata section.
-# cr16 and crx use non-standard scripts with memory regions, which don't play
+# cr16, crx and ft32 use non-standard scripts with memory regions, which don't play
# well with unique group sections under ld -r.
#...
diff --git a/ld/testsuite/ld-elf/merge.d b/ld/testsuite/ld-elf/merge.d
index 7c1e4f0..f3ed882 100644
--- a/ld/testsuite/ld-elf/merge.d
+++ b/ld/testsuite/ld-elf/merge.d
@@ -6,7 +6,7 @@
#xfail: "i370-*-*" "i860-*-*" "i960-*-*" "ip2k-*-*" "iq2000-*-*" "lm32-*-*"
#xfail: "mcore-*-*" "mn102*-*-*" "ms1-*-*" "mep-*-*"
#xfail: "or32-*-*" "pj-*-*" "sparc*-*-*" "tic6x-*-*" "vax-*-*" "xstormy16-*-*"
-#xfail: "xtensa*-*-*" "metag-*-*"
+#xfail: "xtensa*-*-*" "metag-*-*" "ft32-*-*"
.*: file format .*elf.*
diff --git a/ld/testsuite/ld-elf/orphan-region.d b/ld/testsuite/ld-elf/orphan-region.d
index 8fe6711..a74caf7 100644
--- a/ld/testsuite/ld-elf/orphan-region.d
+++ b/ld/testsuite/ld-elf/orphan-region.d
@@ -1,7 +1,7 @@
#source: orphan-region.s
#ld: -T orphan-region.ld -N -z stack-size=0
#readelf: -S -l --wide
-#xfail: d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-*
+#xfail: d30v-*-* dlx-*-* fr30-*-* frv-*-elf ft32-*-* i860-*-* i960-*-*
#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* pj*-*-*
#xfail: spu-*-* hppa*64*-*-* *-*-nacl*
# if not using elf32.em, you don't get fancy orphan handling
diff --git a/ld/testsuite/ld-elf/orphan.d b/ld/testsuite/ld-elf/orphan.d
index 1af4869..d03281e 100644
--- a/ld/testsuite/ld-elf/orphan.d
+++ b/ld/testsuite/ld-elf/orphan.d
@@ -1,7 +1,7 @@
#source: orphan.s
#ld: -T orphan.ld
#readelf: -S --wide
-#xfail: d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-*
+#xfail: d30v-*-* dlx-*-* fr30-*-* frv-*-elf ft32-*-* i860-*-* i960-*-*
#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* pj*-*-*
# if not using elf32.em, you don't get fancy orphan handling
diff --git a/ld/testsuite/ld-elf/orphan3.d b/ld/testsuite/ld-elf/orphan3.d
index c098e1b..3331e3f 100644
--- a/ld/testsuite/ld-elf/orphan3.d
+++ b/ld/testsuite/ld-elf/orphan3.d
@@ -6,7 +6,7 @@
#source: orphan3f.s
#ld:
#readelf: -S --wide
-#xfail: "d30v-*-*" "dlx-*-*" "fr30-*-*" "frv-*-elf"
+#xfail: "d30v-*-*" "dlx-*-*" "fr30-*-*" "frv-*-elf" "ft32-*-*"
#xfail: "i860-*-*" "i960-*-*" "iq2000-*-*" "mn10200-*-*" "msp430-*-*" "mt-*-*"
#xfail: "pj-*-*"
#xfail: "xstormy16-*-*"
diff --git a/ld/testsuite/ld-elf/pr349.d b/ld/testsuite/ld-elf/pr349.d
index 7c4ff73..565e387 100644
--- a/ld/testsuite/ld-elf/pr349.d
+++ b/ld/testsuite/ld-elf/pr349.d
@@ -2,7 +2,7 @@
#source: pr349-2.s
#ld: -r
#readelf: -S
-#xfail: d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-*
+#xfail: d30v-*-* dlx-*-* fr30-*-* frv-*-elf ft32-*-* i860-*-* i960-*-*
#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* pj*-*-*
# if not using elf32.em, you don't get fancy section handling
diff --git a/ld/testsuite/ld-elf/sec-to-seg.exp b/ld/testsuite/ld-elf/sec-to-seg.exp
index 51c3bde..8847318 100644
--- a/ld/testsuite/ld-elf/sec-to-seg.exp
+++ b/ld/testsuite/ld-elf/sec-to-seg.exp
@@ -78,6 +78,7 @@ if { [istarget avr-*-*]
|| [istarget cr16-*-*]
|| [istarget crx-*-*]
|| [istarget dlx-*-*]
+ || [istarget ft32-*-*]
|| [istarget h8300-*-*]
|| [istarget i960-*-*]
|| [istarget ip2k-*-*]
diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/sec64k.exp
index b0e49ea..b089fb8 100644
--- a/ld/testsuite/ld-elf/sec64k.exp
+++ b/ld/testsuite/ld-elf/sec64k.exp
@@ -40,8 +40,10 @@ if { [istarget "arc*-*-*"]
return
}
-# m68hc11, m68hc12 and xgate run out of address space.
-if { [istarget "m68hc1*-*"] || [istarget "xgate-*"] } {
+# ft32, m68hc11, m68hc12 and xgate run out of address space.
+if { [istarget "ft32-*-*"]
+ || [istarget "m68hc1*-*"]
+ || [istarget "xgate-*"] } {
return
}
diff --git a/ld/testsuite/ld-elf/warn2.d b/ld/testsuite/ld-elf/warn2.d
index 8b3f4a0..cfeb8ce 100644
--- a/ld/testsuite/ld-elf/warn2.d
+++ b/ld/testsuite/ld-elf/warn2.d
@@ -5,7 +5,7 @@
#warning: ^[^\\n]*\.[obj]+: warning: function 'Foo' used$
#readelf: -s
#notarget: "sparc64-*-solaris2*" "sparcv9-*-solaris2*"
-#xfail: d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-*
+#xfail: d30v-*-* dlx-*-* fr30-*-* frv-*-elf ft32-*-* i860-*-* i960-*-*
#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* pj*-*-*
# if not using elf32.em, you don't get fancy section handling
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index d2ece76..07ed747 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1719,6 +1719,7 @@ proc check_shared_lib_support { } {
&& ![istarget dlx-*-*]
&& ![istarget epiphany-*-*]
&& ![istarget fr30-*-*]
+ && ![istarget ft32-*-*]
&& ![istarget frv-*-*]
&& ![istarget h8300-*-*]
&& ![istarget i860-*-*]