]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
This commit was manufactured by cvs2svn to create branch 'binutils-
authornobody <>
Tue, 5 Mar 2013 02:55:28 +0000 (02:55 +0000)
committernobody <>
Tue, 5 Mar 2013 02:55:28 +0000 (02:55 +0000)
2_23-branch'.

Cherrypick from master 2013-03-05 02:55:27 UTC Alan Modra <amodra@gmail.com> ' PR ld/15222':
    ld/testsuite/ld-scripts/rgn-at6.d
    ld/testsuite/ld-scripts/rgn-at6.s
    ld/testsuite/ld-scripts/rgn-at6.t
    ld/testsuite/ld-scripts/rgn-at7.d
    ld/testsuite/ld-scripts/rgn-at7.t

ld/testsuite/ld-scripts/rgn-at6.d [new file with mode: 0644]
ld/testsuite/ld-scripts/rgn-at6.s [new file with mode: 0644]
ld/testsuite/ld-scripts/rgn-at6.t [new file with mode: 0644]
ld/testsuite/ld-scripts/rgn-at7.d [new file with mode: 0644]
ld/testsuite/ld-scripts/rgn-at7.t [new file with mode: 0644]

diff --git a/ld/testsuite/ld-scripts/rgn-at6.d b/ld/testsuite/ld-scripts/rgn-at6.d
new file mode 100644 (file)
index 0000000..80f9b8a
--- /dev/null
@@ -0,0 +1,9 @@
+#source: rgn-at6.s
+#ld: -T rgn-at6.t
+#objdump: -h --wide
+#xfail: rx-*-*
+# Test that lma is aligned as for vma when lma_region==region.
+
+#...
+.* 0+10000 +0+10000 .*
+.* 0+10100 +0+10100 .*
diff --git a/ld/testsuite/ld-scripts/rgn-at6.s b/ld/testsuite/ld-scripts/rgn-at6.s
new file mode 100644 (file)
index 0000000..20571bc
--- /dev/null
@@ -0,0 +1,6 @@
+ .text
+ .long 0
+
+ .data
+ .p2align 8
+ .long 0
diff --git a/ld/testsuite/ld-scripts/rgn-at6.t b/ld/testsuite/ld-scripts/rgn-at6.t
new file mode 100644 (file)
index 0000000..0408dcd
--- /dev/null
@@ -0,0 +1,11 @@
+MEMORY
+{
+  ram : ORIGIN = 0x10000, LENGTH = 0x10000
+}
+
+SECTIONS
+{
+  .text : {*(.text)} > ram AT> ram
+  .data : ALIGN (16) {*(.data)} > ram AT> ram
+  /DISCARD/ : {*(*)}
+}
diff --git a/ld/testsuite/ld-scripts/rgn-at7.d b/ld/testsuite/ld-scripts/rgn-at7.d
new file mode 100644 (file)
index 0000000..a12ca17
--- /dev/null
@@ -0,0 +1,9 @@
+#source: rgn-at6.s
+#ld: -T rgn-at7.t
+#objdump: -h --wide
+#xfail: rx-*-*
+# Test that lma is only aligned by script when lma_region!=region.
+
+#...
+.* 0+10000 +0+20000 .*
+.* 0+10100 +0+20010 .*
diff --git a/ld/testsuite/ld-scripts/rgn-at7.t b/ld/testsuite/ld-scripts/rgn-at7.t
new file mode 100644 (file)
index 0000000..c1f2789
--- /dev/null
@@ -0,0 +1,12 @@
+MEMORY
+{
+  ram : ORIGIN = 0x10000, LENGTH = 0x10000
+  rom : ORIGIN = 0x20000, LENGTH = 0x10000
+}
+
+SECTIONS
+{
+  .text : {*(.text)} > ram AT> rom
+  .data : ALIGN (16) {*(.data)} > ram AT> rom
+  /DISCARD/ : {*(*)}
+}