diff options
Diffstat (limited to 'ld/testsuite/ld-scripts')
-rw-r--r-- | ld/testsuite/ld-scripts/memory.t | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/region-alias-1.t | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/region-alias-2.t | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/region-alias-3.t | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/region-alias-4.t | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-over1.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-over2.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-over3.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-over4.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-over5.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-over6.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/rgn-over7.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-scripts/script.exp | 10 |
13 files changed, 50 insertions, 9 deletions
diff --git a/ld/testsuite/ld-scripts/memory.t b/ld/testsuite/ld-scripts/memory.t index 8a73c58801b..6623b289392 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 00000000000..91f81005e1d --- /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 00000000000..a6b1514882c --- /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 00000000000..667879b7d25 --- /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 00000000000..da9dff50f0f --- /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 2ce7ffc90c4..54892be41d8 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 ace01178985..1a5afea8d5f 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 91504177692..76fa7c53b3b 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 e4e98c56c85..1087aec58c4 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 abce4e180a5..734d9feed67 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 d7088a0166c..00b41d05630 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 52442ba87df..82cfea43ee7 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 62c98bede4a..88d4b4fb298 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" + } +} |