Add a testcase for PR ld/12356.
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 13 Jan 2011 17:07:52 +0000 (17:07 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 13 Jan 2011 17:07:52 +0000 (17:07 +0000)
2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/12356
* ld-scripts/defined.exp: Run defined5.

* ld-scripts/defined5.d: New.
* ld-scripts/defined5.s: Likewise.
* ld-scripts/defined5.t: Likewise.

ld/testsuite/ChangeLog
ld/testsuite/ld-scripts/defined.exp
ld/testsuite/ld-scripts/defined5.d [new file with mode: 0644]
ld/testsuite/ld-scripts/defined5.s [new file with mode: 0644]
ld/testsuite/ld-scripts/defined5.t [new file with mode: 0644]

index 61a6117b3293962ccb8e9254d811d08e34774e65..94c35e386617b798ac5b5689c9d303a761f4d356 100644 (file)
@@ -1,3 +1,12 @@
+2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/12356
+       * ld-scripts/defined.exp: Run defined5.
+
+       * ld-scripts/defined5.d: New.
+       * ld-scripts/defined5.s: Likewise.
+       * ld-scripts/defined5.t: Likewise.
+
 2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>
 
        * ld-scripts/defined4.d: Xfail rs6000-*-aix*.  Skip mips*-*-*
index 6d0c9d50edbe861b3da2095fff709ee78fe633e1..10f14daf83d29bba501b585cb0debd7874bdcd3d 100644 (file)
@@ -67,4 +67,5 @@ set prms_id 0
 run_dump_test "defined2"
 run_dump_test "defined3"
 run_dump_test "defined4"
+run_dump_test "defined5"
 set LDFLAGS "$saved_LDFLAGS"
diff --git a/ld/testsuite/ld-scripts/defined5.d b/ld/testsuite/ld-scripts/defined5.d
new file mode 100644 (file)
index 0000000..3977c93
--- /dev/null
@@ -0,0 +1,9 @@
+#ld: -Tdefined5.t
+#nm: -B
+#source: defined5.s
+#xfail: rs6000-*-aix*
+
+# Check that arithmetic on DEFINED works.
+#...
+0+1000 D defined
+#pass
diff --git a/ld/testsuite/ld-scripts/defined5.s b/ld/testsuite/ld-scripts/defined5.s
new file mode 100644 (file)
index 0000000..592e54c
--- /dev/null
@@ -0,0 +1,6 @@
+       .globl  defined
+       .data
+       .byte 0
+       .section .data.cacheline_aligned
+defined:
+       .byte 0
diff --git a/ld/testsuite/ld-scripts/defined5.t b/ld/testsuite/ld-scripts/defined5.t
new file mode 100644 (file)
index 0000000..189da6b
--- /dev/null
@@ -0,0 +1,7 @@
+defined = addr1;
+SECTIONS {
+       .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+       . = ALIGN (0x1000);
+       .data : { *(.data) }
+       addr1  = ADDR (.data);
+}