aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog8
-rw-r--r--ld/testsuite/ld-elf/group8a.d1
-rw-r--r--ld/testsuite/ld-elf/group8b.d1
-rw-r--r--ld/testsuite/ld-elf/group9a.d1
-rw-r--r--ld/testsuite/ld-elf/group9b.d1
-rw-r--r--ld/testsuite/ld-scripts/memory.t10
-rw-r--r--ld/testsuite/ld-scripts/region-alias-1.t7
-rw-r--r--ld/testsuite/ld-scripts/region-alias-2.t6
-rw-r--r--ld/testsuite/ld-scripts/region-alias-3.t6
-rw-r--r--ld/testsuite/ld-scripts/region-alias-4.t6
-rw-r--r--ld/testsuite/ld-scripts/rgn-over1.d2
-rw-r--r--ld/testsuite/ld-scripts/rgn-over2.d2
-rw-r--r--ld/testsuite/ld-scripts/rgn-over3.d2
-rw-r--r--ld/testsuite/ld-scripts/rgn-over4.d2
-rw-r--r--ld/testsuite/ld-scripts/rgn-over5.d2
-rw-r--r--ld/testsuite/ld-scripts/rgn-over6.d2
-rw-r--r--ld/testsuite/ld-scripts/rgn-over7.d2
-rw-r--r--ld/testsuite/ld-scripts/script.exp10
18 files changed, 62 insertions, 9 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 88fb12b..c338bb4 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2009-03-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * ld-scripts/regions-alias-1.t: New file.
+ * ld-scripts/regions-alias-2.t: New file.
+ * ld-scripts/regions-alias-3.t: New file.
+ * ld-scripts/regions-alias-4.t: New file.
+ * ld-scripts/script.exp: Run region alias tests.
+
2009-02-27 Dave Korn <dave.korn.cygwin@gmail.com>
* ld-pe/pe.exp: Disable auto-import when linking on Cygwin.
diff --git a/ld/testsuite/ld-elf/group8a.d b/ld/testsuite/ld-elf/group8a.d
index b557151..455e02f 100644
--- a/ld/testsuite/ld-elf/group8a.d
+++ b/ld/testsuite/ld-elf/group8a.d
@@ -2,6 +2,7 @@
#ld: -r --gc-sections --entry foo
#readelf: -g --wide
#notarget: ia64-*-* mep-*-*
+#xfail: dlx-*-* openrisc-*-* or32-*-* alpha-*-* arc-*-* hppa64-*-*
COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 1 sections:
\[Index\] Name
diff --git a/ld/testsuite/ld-elf/group8b.d b/ld/testsuite/ld-elf/group8b.d
index 0a78173..6e88454 100644
--- a/ld/testsuite/ld-elf/group8b.d
+++ b/ld/testsuite/ld-elf/group8b.d
@@ -2,6 +2,7 @@
#ld: -r --gc-sections --entry bar
#readelf: -g --wide
#notarget: ia64-*-* mep-*-*
+#xfail: dlx-*-* openrisc-*-* or32-*-* alpha-*-* arc-*-* hppa64-*-*
COMDAT group section \[[ 0-9]+\] `.group' \[bar\] contains 1 sections:
\[Index\] Name
diff --git a/ld/testsuite/ld-elf/group9a.d b/ld/testsuite/ld-elf/group9a.d
index a20e24f..1410ea5 100644
--- a/ld/testsuite/ld-elf/group9a.d
+++ b/ld/testsuite/ld-elf/group9a.d
@@ -2,6 +2,7 @@
#ld: -r --gc-sections --entry foo
#readelf: -g --wide
#notarget: ia64-*-* mep-*-*
+#xfail: dlx-*-* openrisc-*-* or32-*-* alpha-*-* arc-*-*
COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 2 sections:
\[Index\] Name
diff --git a/ld/testsuite/ld-elf/group9b.d b/ld/testsuite/ld-elf/group9b.d
index a28d670..89418dd 100644
--- a/ld/testsuite/ld-elf/group9b.d
+++ b/ld/testsuite/ld-elf/group9b.d
@@ -2,6 +2,7 @@
#ld: -r --gc-sections --entry bar
#readelf: -g --wide
#notarget: ia64-*-* mep-*-*
+#xfail: dlx-*-* openrisc-*-* or32-*-* alpha-*-* hppa64-*-* arc-*-*
COMDAT group section \[[ 0-9]+\] `.group' \[foo\] contains 2 sections:
\[Index\] Name
diff --git a/ld/testsuite/ld-scripts/memory.t b/ld/testsuite/ld-scripts/memory.t
index 8a73c58..6623b28 100644
--- a/ld/testsuite/ld-scripts/memory.t
+++ b/ld/testsuite/ld-scripts/memory.t
@@ -1,9 +1,15 @@
MEMORY
{
- TEXTMEM (ARX) : ORIGIN = 0x100, LENGTH = 32K
- DATAMEM (AW) : org = 0x1000, l = (64 * 1024)
+ R_TEXTMEM (ARX) : ORIGIN = 0x100, LENGTH = 32K
+ R_DATAMEM (AW) : org = 0x1000, l = (64 * 1024)
}
+REGION_ALIAS ("A_TEXTMEM", R_TEXTMEM);
+REGION_ALIAS ("A_DATAMEM", R_DATAMEM);
+
+REGION_ALIAS ("TEXTMEM", A_TEXTMEM);
+REGION_ALIAS ("DATAMEM", A_DATAMEM);
+
SECTIONS
{
. = 0;
diff --git a/ld/testsuite/ld-scripts/region-alias-1.t b/ld/testsuite/ld-scripts/region-alias-1.t
new file mode 100644
index 0000000..91f8100
--- /dev/null
+++ b/ld/testsuite/ld-scripts/region-alias-1.t
@@ -0,0 +1,7 @@
+MEMORY
+{
+ MY_REGION (ARX) : ORIGIN = 0, LENGTH = 32K
+}
+
+REGION_ALIAS ("MY_ALIAS", MY_REGION);
+REGION_ALIAS ("MY_ALIAS", MY_REGION);
diff --git a/ld/testsuite/ld-scripts/region-alias-2.t b/ld/testsuite/ld-scripts/region-alias-2.t
new file mode 100644
index 0000000..a6b1514
--- /dev/null
+++ b/ld/testsuite/ld-scripts/region-alias-2.t
@@ -0,0 +1,6 @@
+MEMORY
+{
+ MY_REGION (ARX) : ORIGIN = 0, LENGTH = 32K
+}
+
+REGION_ALIAS ("MY_ALIAS", "NIL");
diff --git a/ld/testsuite/ld-scripts/region-alias-3.t b/ld/testsuite/ld-scripts/region-alias-3.t
new file mode 100644
index 0000000..667879b
--- /dev/null
+++ b/ld/testsuite/ld-scripts/region-alias-3.t
@@ -0,0 +1,6 @@
+MEMORY
+{
+ MY_REGION (ARX) : ORIGIN = 0, LENGTH = 32K
+}
+
+REGION_ALIAS ("MY_ALIAS", "*default*");
diff --git a/ld/testsuite/ld-scripts/region-alias-4.t b/ld/testsuite/ld-scripts/region-alias-4.t
new file mode 100644
index 0000000..da9dff5
--- /dev/null
+++ b/ld/testsuite/ld-scripts/region-alias-4.t
@@ -0,0 +1,6 @@
+MEMORY
+{
+ MY_REGION (ARX) : ORIGIN = 0, LENGTH = 32K
+}
+
+REGION_ALIAS ("*default*", MY_REGION);
diff --git a/ld/testsuite/ld-scripts/rgn-over1.d b/ld/testsuite/ld-scripts/rgn-over1.d
index 2ce7ffc..54892be 100644
--- a/ld/testsuite/ld-scripts/rgn-over1.d
+++ b/ld/testsuite/ld-scripts/rgn-over1.d
@@ -1,7 +1,7 @@
# name: rgn-over1
# source: rgn-over.s
# ld: -T rgn-over1.t -Map tmpdir/rgn-over1.map
-# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section \.text will not fit in region r1\n[^ \n]*?ld[^:\n]*?: region r1 overflowed by 16 bytes\Z
+# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section \`.text' will not fit in region `r1'\n[^ \n]*?ld[^:\n]*?: region `r1' overflowed by 16 bytes\Z
Discarded input sections
#...
diff --git a/ld/testsuite/ld-scripts/rgn-over2.d b/ld/testsuite/ld-scripts/rgn-over2.d
index ace0117..1a5afea 100644
--- a/ld/testsuite/ld-scripts/rgn-over2.d
+++ b/ld/testsuite/ld-scripts/rgn-over2.d
@@ -1,7 +1,7 @@
# name: rgn-over2
# source: rgn-over.s
# ld: -T rgn-over2.t -Map tmpdir/rgn-over2.map
-# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section \.data will not fit in region r1\n[^ \n]*?ld[^:\n]*?: region r1 overflowed by 4 bytes\Z
+# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section `\.data' will not fit in region `r1'\n[^ \n]*?ld[^:\n]*?: region `r1' overflowed by 4 bytes\Z
Discarded input sections
#...
diff --git a/ld/testsuite/ld-scripts/rgn-over3.d b/ld/testsuite/ld-scripts/rgn-over3.d
index 9150417..76fa7c5 100644
--- a/ld/testsuite/ld-scripts/rgn-over3.d
+++ b/ld/testsuite/ld-scripts/rgn-over3.d
@@ -1,7 +1,7 @@
# name: rgn-over3
# source: rgn-over.s
# ld: -T rgn-over3.t -Map tmpdir/rgn-over3.map
-# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section \.text will not fit in region r1\n[^ \n]*?ld[^:\n]*?: [^\n]*?section \.data will not fit in region r2\n[^ \n]*?ld[^:\n]*?: region r1 overflowed by 4 bytes\n[^ \n]*?ld[^:\n]*?: region r2 overflowed by 4 bytes\Z
+# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section `\.text' will not fit in region `r1'\n[^ \n]*?ld[^:\n]*?: [^\n]*?section `\.data' will not fit in region `r2'\n[^ \n]*?ld[^:\n]*?: region `r1' overflowed by 4 bytes\n[^ \n]*?ld[^:\n]*?: region `r2' overflowed by 4 bytes\Z
Discarded input sections
#...
diff --git a/ld/testsuite/ld-scripts/rgn-over4.d b/ld/testsuite/ld-scripts/rgn-over4.d
index e4e98c5..1087aec 100644
--- a/ld/testsuite/ld-scripts/rgn-over4.d
+++ b/ld/testsuite/ld-scripts/rgn-over4.d
@@ -1,7 +1,7 @@
# name: rgn-over4
# source: rgn-over.s
# ld: -T rgn-over4.t -Map tmpdir/rgn-over4.map
-# error: \A[^ \n]*?ld[^:\n]*?: [^:\n]*?section \.text will not fit in region r1\n[^ \n]*?ld[^:\n]*?: region r1 overflowed by 16 bytes\Z
+# error: \A[^ \n]*?ld[^:\n]*?: [^:\n]*?section `\.text' will not fit in region `r1'\n[^ \n]*?ld[^:\n]*?: region `r1' overflowed by 16 bytes\Z
Discarded input sections
#...
diff --git a/ld/testsuite/ld-scripts/rgn-over5.d b/ld/testsuite/ld-scripts/rgn-over5.d
index abce4e1..734d9fe 100644
--- a/ld/testsuite/ld-scripts/rgn-over5.d
+++ b/ld/testsuite/ld-scripts/rgn-over5.d
@@ -1,7 +1,7 @@
# name: rgn-over5
# source: rgn-over.s
# ld: -T rgn-over5.t -Map tmpdir/rgn-over5.map
-# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section \.text will not fit in region v1\n[^ \n]*?ld[^:\n]*?: region v1 overflowed by 16 bytes\Z
+# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section `\.text' will not fit in region `v1'\n[^ \n]*?ld[^:\n]*?: region `v1' overflowed by 16 bytes\Z
Discarded input sections
#...
diff --git a/ld/testsuite/ld-scripts/rgn-over6.d b/ld/testsuite/ld-scripts/rgn-over6.d
index d7088a0..00b41d0 100644
--- a/ld/testsuite/ld-scripts/rgn-over6.d
+++ b/ld/testsuite/ld-scripts/rgn-over6.d
@@ -1,7 +1,7 @@
# name: rgn-over6
# source: rgn-over.s
# ld: -T rgn-over6.t -Map tmpdir/rgn-over6.map
-# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section \.text will not fit in region r1\n[^ \n]*?ld[^:\n]*?: [^\n]*?section \.text will not fit in region v1\n[^ \n]*?ld[^:\n]*?: region r1 overflowed by 16 bytes\n[^ \n]*?ld[^:\n]*?: region v1 overflowed by 16 bytes\Z
+# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section `\.text' will not fit in region `r1'\n[^ \n]*?ld[^:\n]*?: [^\n]*?section `\.text' will not fit in region `v1'\n[^ \n]*?ld[^:\n]*?: region `r1' overflowed by 16 bytes\n[^ \n]*?ld[^:\n]*?: region `v1' overflowed by 16 bytes\Z
Discarded input sections
#...
diff --git a/ld/testsuite/ld-scripts/rgn-over7.d b/ld/testsuite/ld-scripts/rgn-over7.d
index 52442ba..82cfea4 100644
--- a/ld/testsuite/ld-scripts/rgn-over7.d
+++ b/ld/testsuite/ld-scripts/rgn-over7.d
@@ -1,7 +1,7 @@
# name: rgn-over7
# source: rgn-over.s
# ld: -T rgn-over7.t -Map tmpdir/rgn-over7.map
-# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section \.text will not fit in region r1\n[^ \n]*?ld[^:\n]*?: section \.data \[0+1008 -> 0+1013\] overlaps section \.text \[0+1000 -> 0+100b\]\n[^ \n]*?ld[^:\n]*?: region r1 overflowed by 4 bytes\Z
+# error: \A[^ \n]*?ld[^:\n]*?: [^\n]*?section `\.text' will not fit in region `r1'\n[^ \n]*?ld[^:\n]*?: section \.data \[0+1008 -> 0+1013\] overlaps section \.text \[0+1000 -> 0+100b\]\n[^ \n]*?ld[^:\n]*?: region `r1' overflowed by 4 bytes\Z
Discarded input sections
#...
diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp
index 62c98be..88d4b4f 100644
--- a/ld/testsuite/ld-scripts/script.exp
+++ b/ld/testsuite/ld-scripts/script.exp
@@ -126,3 +126,13 @@ if ![ld_simple_link $ld tmpdir/script "$flags -T $srcdir/$subdir/memory.t tmpdir
} else {
check_script
}
+
+set test_script_list [glob $srcdir/$subdir/region-alias-*.t]
+
+foreach test_script $test_script_list {
+ if ![ld_simple_link $ld tmpdir/script "$flags -T $test_script tmpdir/script.o"] {
+ xfail "REGION_ALIAS: $test_script"
+ } else {
+ xpass "REGION_ALIAS: $test_script"
+ }
+}