aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gold/testsuite')
-rw-r--r--gold/testsuite/memory_test.s10
-rwxr-xr-xgold/testsuite/memory_test.sh19
-rw-r--r--gold/testsuite/memory_test.t8
3 files changed, 25 insertions, 12 deletions
diff --git a/gold/testsuite/memory_test.s b/gold/testsuite/memory_test.s
index dbb63ea..ce8576c 100644
--- a/gold/testsuite/memory_test.s
+++ b/gold/testsuite/memory_test.s
@@ -1,14 +1,14 @@
.section .sec0, "a"
- .word 0
+ .long 0
.section .sec1, "a"
- .word 0x11
+ .long 0x11
.section .sec2, "a"
- .word 0x22
+ .long 0x22
.section .sec3, "a"
- .word 0x33
+ .long 0x33
.section .sec4, "a"
- .word 0x44
+ .long 0x44
diff --git a/gold/testsuite/memory_test.sh b/gold/testsuite/memory_test.sh
index 5c172f4..db3917a 100755
--- a/gold/testsuite/memory_test.sh
+++ b/gold/testsuite/memory_test.sh
@@ -23,6 +23,14 @@
# MA 02110-1301, USA.
+# NOTE: The linker script used in this test (memory_test.t)
+# should be the same as the one used in the rgn-at5 linker
+# test (ld/testsuite/ld-scripts/rgn-at5.t).
+#
+# Modulo some section ordering the output from GOLD in this
+# test should be the same as the output from GNU LD in the
+# rgn-at5 test.
+
check()
{
file=$1
@@ -36,13 +44,14 @@ check()
}
check memory_test.stdout \
- " LOAD 0x001000 0x0*00000000 0x0*00000000 0x00000\?2 0x00000\?2 R 0x1000"
+ " LOAD 0x001000 0x0*02000 0x0*02000 0x0*04 0x0*04 R 0x1000"
check memory_test.stdout \
- " LOAD 0x00112c 0x0*00001000 0x0*0000012c 0x00000\?2 0x00000\?2 R 0x1000"
+ " LOAD 0x001004 0x0*01000 0x0*02004 0x0*04 0x0*04 R 0x1000"
check memory_test.stdout \
- " LOAD 0x002000 0x0*00005000 0x0*00005000 0x00000\?2 0x00000\?2 R 0x1000"
+ " LOAD 0x001008 0x0*02008 0x0*02008 0x0*08 0x0*08 R 0x1000"
check memory_test.stdout \
- " LOAD 0x00203c 0x0*00004000 0x0*0000603c 0x00000\?2 0x00000\?2 R 0x1000"
-
+ " LOAD 0x002000 0x0*05000 0x0*05000 0x0*04 0x0*04 R 0x1000"
+check memory_test.stdout \
+ " LOAD 0x00203c 0x0*04000 0x0*0603c 0x0*04 0x0*04 R 0x1000"
exit 0
diff --git a/gold/testsuite/memory_test.t b/gold/testsuite/memory_test.t
index 5963c93..3a35994 100644
--- a/gold/testsuite/memory_test.t
+++ b/gold/testsuite/memory_test.t
@@ -10,13 +10,17 @@ SECTIONS
{
.sec0 : { *(*.sec0) }
- .sec1 ORIGIN (region1) : AT(LENGTH (region2)) { *(*.sec1) }
+ .sec1 ORIGIN (region1) : { *(*.sec1) } AT> region2
- fred = ORIGIN (region1) + LENGTH (region1) ;
+ fred = ORIGIN (region1) + LENGTH (region1);
.sec2 : { *(*.sec2) } > region3 AT> region4
.sec3 0x5000 : { *(*.sec3) }
+ .sec4 : { *(*.sec4) } AT> region2
+
+ .sec5 : { LONG(0x5555) } > region2
+
/DISCARD/ : { *(*) }
}