This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR ld/12356: [Regression] x86_64 kernel failed to link
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Thu, 13 Jan 2011 09:10:02 -0800
- Subject: PATCH: PR ld/12356: [Regression] x86_64 kernel failed to link
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
I checked in this patch to add a testcase.
H.J.
---
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.
diff --git a/ld/testsuite/ld-scripts/defined.exp b/ld/testsuite/ld-scripts/defined.exp
index 6d0c9d5..10f14da 100644
--- a/ld/testsuite/ld-scripts/defined.exp
+++ b/ld/testsuite/ld-scripts/defined.exp
@@ -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
index 0000000..3977c93
--- /dev/null
+++ b/ld/testsuite/ld-scripts/defined5.d
@@ -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
index 0000000..592e54c
--- /dev/null
+++ b/ld/testsuite/ld-scripts/defined5.s
@@ -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
index 0000000..189da6b
--- /dev/null
+++ b/ld/testsuite/ld-scripts/defined5.t
@@ -0,0 +1,7 @@
+defined = addr1;
+SECTIONS {
+ .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+ . = ALIGN (0x1000);
+ .data : { *(.data) }
+ addr1 = ADDR (.data);
+}