aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-scripts')
-rw-r--r--ld/testsuite/ld-scripts/rgn-at10.d12
-rw-r--r--ld/testsuite/ld-scripts/rgn-at10.s10
-rw-r--r--ld/testsuite/ld-scripts/rgn-at10.t13
-rw-r--r--ld/testsuite/ld-scripts/rgn-at11.d11
-rw-r--r--ld/testsuite/ld-scripts/rgn-at11.t13
-rw-r--r--ld/testsuite/ld-scripts/rgn-at9.d10
-rw-r--r--ld/testsuite/ld-scripts/rgn-at9.t12
7 files changed, 81 insertions, 0 deletions
diff --git a/ld/testsuite/ld-scripts/rgn-at10.d b/ld/testsuite/ld-scripts/rgn-at10.d
new file mode 100644
index 0000000..73ebfcc
--- /dev/null
+++ b/ld/testsuite/ld-scripts/rgn-at10.d
@@ -0,0 +1,12 @@
+#source: rgn-at10.s
+#ld: -T rgn-at10.t
+#objdump: -h --wide
+#xfail: rx-*-*
+# Test that lma is adjusted in case the section start vma is aligned and
+# lma_region != region if requested by script. Make sure this works with
+# non-load sections.
+
+#...
+.* 0+10000 +0+20000 .*
+.* 0+10100 +0+20100 .*
+.* 0+10100 +0+20100 .*
diff --git a/ld/testsuite/ld-scripts/rgn-at10.s b/ld/testsuite/ld-scripts/rgn-at10.s
new file mode 100644
index 0000000..b538205
--- /dev/null
+++ b/ld/testsuite/ld-scripts/rgn-at10.s
@@ -0,0 +1,10 @@
+ .text
+ .long 0
+
+ .section .tbss,"awT",%nobits
+ .p2align 8
+ .zero 4
+
+ .data
+ .p2align 4
+ .long 0
diff --git a/ld/testsuite/ld-scripts/rgn-at10.t b/ld/testsuite/ld-scripts/rgn-at10.t
new file mode 100644
index 0000000..0aa0b27
--- /dev/null
+++ b/ld/testsuite/ld-scripts/rgn-at10.t
@@ -0,0 +1,13 @@
+MEMORY
+{
+ ram : ORIGIN = 0x10000, LENGTH = 0x10000
+ rom : ORIGIN = 0x20000, LENGTH = 0x10000
+}
+
+SECTIONS
+{
+ .text : ALIGN_WITH_INPUT {*(.text)} > ram AT> rom
+ .tbss : ALIGN_WITH_INPUT {*(.tbss)} > ram AT> rom
+ .data : ALIGN_WITH_INPUT {*(.data)} > ram AT> rom
+ /DISCARD/ : {*(*)}
+}
diff --git a/ld/testsuite/ld-scripts/rgn-at11.d b/ld/testsuite/ld-scripts/rgn-at11.d
new file mode 100644
index 0000000..9ebbd28
--- /dev/null
+++ b/ld/testsuite/ld-scripts/rgn-at11.d
@@ -0,0 +1,11 @@
+#source: rgn-at10.s
+#ld: -T rgn-at11.t
+#objdump: -h --wide
+#xfail: rx-*-*
+# Test that lma is not adjusted in case the section start vma is aligned and
+# lma_region != region if not requested by script.
+
+#...
+.* 0+10000 +0+20000 .*
+.* 0+10100 +0+20004 .*
+.* 0+10100 +0+20004 .*
diff --git a/ld/testsuite/ld-scripts/rgn-at11.t b/ld/testsuite/ld-scripts/rgn-at11.t
new file mode 100644
index 0000000..4f07c9d
--- /dev/null
+++ b/ld/testsuite/ld-scripts/rgn-at11.t
@@ -0,0 +1,13 @@
+MEMORY
+{
+ ram : ORIGIN = 0x10000, LENGTH = 0x10000
+ rom : ORIGIN = 0x20000, LENGTH = 0x10000
+}
+
+SECTIONS
+{
+ .text : ALIGN_WITH_INPUT {*(.text)} > ram AT> rom
+ .tbss : {*(.tbss)} > ram AT> rom
+ .data : ALIGN_WITH_INPUT {*(.data)} > ram AT> rom
+ /DISCARD/ : {*(*)}
+}
diff --git a/ld/testsuite/ld-scripts/rgn-at9.d b/ld/testsuite/ld-scripts/rgn-at9.d
new file mode 100644
index 0000000..e6384b4
--- /dev/null
+++ b/ld/testsuite/ld-scripts/rgn-at9.d
@@ -0,0 +1,10 @@
+#source: rgn-at6.s
+#ld: -T rgn-at9.t
+#objdump: -h --wide
+#xfail: rx-*-*
+# Test that lma is adjusted in case the section start vma is aligned and
+# lma_region != region if requested by script.
+
+#...
+.* 0+10000 +0+20080 .*
+.* 0+10100 +0+20180 .*
diff --git a/ld/testsuite/ld-scripts/rgn-at9.t b/ld/testsuite/ld-scripts/rgn-at9.t
new file mode 100644
index 0000000..7342e64
--- /dev/null
+++ b/ld/testsuite/ld-scripts/rgn-at9.t
@@ -0,0 +1,12 @@
+MEMORY
+{
+ ram : ORIGIN = 0x10000, LENGTH = 0x10000
+ rom : ORIGIN = 0x20080, LENGTH = 0x10000
+}
+
+SECTIONS
+{
+ .text : ALIGN_WITH_INPUT {*(.text)} > ram AT> rom
+ .data : ALIGN_WITH_INPUT {*(.data)} > ram AT> rom
+ /DISCARD/ : {*(*)}
+}