This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[committed, PATCH] Support any relocation order
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Wed, 8 Jun 2016 10:26:45 -0700
- Subject: [committed, PATCH] Support any relocation order
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
* testsuite/ld-x86-64/no-plt-1a.rd: Support any relocation order.
* testsuite/ld-x86-64/no-plt-1b.rd: Likewise.
* testsuite/ld-x86-64/no-plt-1c.rd: Likewise.
* testsuite/ld-x86-64/no-plt-1d.rd: Likewise.
* testsuite/ld-x86-64/no-plt-1e.rd: Likewise.
* testsuite/ld-x86-64/no-plt-1f.rd: Likewise.
* testsuite/ld-x86-64/no-plt-1g.rd: Likewise.
* testsuite/ld-x86-64/no-plt.exp: Fix a typo.
---
ld/ChangeLog | 11 +++++++++++
ld/testsuite/ld-x86-64/no-plt-1a.rd | 4 ++--
ld/testsuite/ld-x86-64/no-plt-1b.rd | 10 +++++-----
ld/testsuite/ld-x86-64/no-plt-1c.rd | 8 ++++----
ld/testsuite/ld-x86-64/no-plt-1e.rd | 4 ++--
ld/testsuite/ld-x86-64/no-plt-1f.rd | 10 +++++-----
ld/testsuite/ld-x86-64/no-plt-1g.rd | 8 ++++----
ld/testsuite/ld-x86-64/no-plt.exp | 2 +-
8 files changed, 34 insertions(+), 23 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index ecff731..f73c01e 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,16 @@
2016-06-08 H.J. Lu <hongjiu.lu@intel.com>
+ * testsuite/ld-x86-64/no-plt-1a.rd: Support any relocation order.
+ * testsuite/ld-x86-64/no-plt-1b.rd: Likewise.
+ * testsuite/ld-x86-64/no-plt-1c.rd: Likewise.
+ * testsuite/ld-x86-64/no-plt-1d.rd: Likewise.
+ * testsuite/ld-x86-64/no-plt-1e.rd: Likewise.
+ * testsuite/ld-x86-64/no-plt-1f.rd: Likewise.
+ * testsuite/ld-x86-64/no-plt-1g.rd: Likewise.
+ * testsuite/ld-x86-64/no-plt.exp: Fix a typo.
+
+2016-06-08 H.J. Lu <hongjiu.lu@intel.com>
+
* testsuite/ld-x86-64/libno-plt-1b.dd: Likewise.
* testsuite/ld-x86-64/libno-plt-1b.rd: Likewise.
* testsuite/ld-x86-64/no-plt-1a.dd: Likewise.
diff --git a/ld/testsuite/ld-x86-64/no-plt-1a.rd b/ld/testsuite/ld-x86-64/no-plt-1a.rd
index fd2e008..78c2a75 100644
--- a/ld/testsuite/ld-x86-64/no-plt-1a.rd
+++ b/ld/testsuite/ld-x86-64/no-plt-1a.rd
@@ -4,7 +4,7 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0
#pass
diff --git a/ld/testsuite/ld-x86-64/no-plt-1b.rd b/ld/testsuite/ld-x86-64/no-plt-1b.rd
index ab1b1af..19833b9 100644
--- a/ld/testsuite/ld-x86-64/no-plt-1b.rd
+++ b/ld/testsuite/ld-x86-64/no-plt-1b.rd
@@ -4,13 +4,13 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ get_func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ call_func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#pass
diff --git a/ld/testsuite/ld-x86-64/no-plt-1c.rd b/ld/testsuite/ld-x86-64/no-plt-1c.rd
index d54913f..ebfea3b 100644
--- a/ld/testsuite/ld-x86-64/no-plt-1c.rd
+++ b/ld/testsuite/ld-x86-64/no-plt-1c.rd
@@ -4,11 +4,11 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ get_func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ call_func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0
#pass
diff --git a/ld/testsuite/ld-x86-64/no-plt-1e.rd b/ld/testsuite/ld-x86-64/no-plt-1e.rd
index fd2e008..78c2a75 100644
--- a/ld/testsuite/ld-x86-64/no-plt-1e.rd
+++ b/ld/testsuite/ld-x86-64/no-plt-1e.rd
@@ -4,7 +4,7 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0
#pass
diff --git a/ld/testsuite/ld-x86-64/no-plt-1f.rd b/ld/testsuite/ld-x86-64/no-plt-1f.rd
index ab1b1af..19833b9 100644
--- a/ld/testsuite/ld-x86-64/no-plt-1f.rd
+++ b/ld/testsuite/ld-x86-64/no-plt-1f.rd
@@ -4,13 +4,13 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ get_func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ call_func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0
#pass
diff --git a/ld/testsuite/ld-x86-64/no-plt-1g.rd b/ld/testsuite/ld-x86-64/no-plt-1g.rd
index d54913f..ebfea3b 100644
--- a/ld/testsuite/ld-x86-64/no-plt-1g.rd
+++ b/ld/testsuite/ld-x86-64/no-plt-1g.rd
@@ -4,11 +4,11 @@
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ get_func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0
#...
-[0-9a-f ]+R_X86_64_GLOB_DAT +0+ call_func \+ 0
+[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0
#pass
diff --git a/ld/testsuite/ld-x86-64/no-plt.exp b/ld/testsuite/ld-x86-64/no-plt.exp
index f57e131..d57ccb5 100644
--- a/ld/testsuite/ld-x86-64/no-plt.exp
+++ b/ld/testsuite/ld-x86-64/no-plt.exp
@@ -103,7 +103,7 @@ run_cc_link_tests [list \
"" \
{dummy.s} \
{{readelf -Wr no-plt-1d.rd} {objdump -dwrj.text no-plt-1d.dd}} \
- "no-plt-1a" \
+ "no-plt-1d" \
] \
[list \
"No PLT (PIE 1e)" \
--
2.5.5