This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [committed, PATCH] x86-64: Use .plt.bnd for IFUNC function address
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Tue, 16 May 2017 08:54:18 -0700
- Subject: Re: [committed, PATCH] x86-64: Use .plt.bnd for IFUNC function address
- Authentication-results: sourceware.org; auth=none
- References: <20170510162932.GA5121@intel.com>
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
On Wed, May 10, 2017 at 09:29:32AM -0700, H.J. Lu wrote:
> When -z bndplt is used, we must use the .plt.bnd entry for IFUNC function
> address.
>
> bfd/
>
> PR ld/21481
> * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
> for IFUNC function address.
>
I checked in this patch.
H.J.
---
PR ld/21481
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/21481 tests only
if IFUNC is supported by run-time.
---
ld/ChangeLog | 6 ++++++
ld/testsuite/ld-x86-64/x86-64.exp | 36 ++++++++++++++++++------------------
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index a1df77a..2034a1a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/21481
+ * testsuite/ld-x86-64/x86-64.exp: Run PR ld/21481 tests only
+ if IFUNC is supported by run-time.
+
2017-05-16 Alan Modra <amodra@gmail.com>
* plugin.c: Rename occurrences of non_ir_ref.
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 05125df..d583f09 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -1221,6 +1221,24 @@ if { [isnative] && [which $CC] != 0 } {
"pr19784b" \
"pass.out" \
] \
+ [list \
+ "Run pr21481a" \
+ "$NOPIE_LDFLAGS -Wl,-z,bndplt" \
+ "" \
+ { pr21481a.c pr21481b.S } \
+ "pr21481a" \
+ "pass.out" \
+ "$NOPIE_CFLAGS" \
+ ] \
+ [list \
+ "Run pr21481b" \
+ "$NOPIE_LDFLAGS -Wl,-z,bndplt,-z,now" \
+ "" \
+ { pr21481a.c pr21481b.S } \
+ "pr21481b" \
+ "pass.out" \
+ "$NOPIE_CFLAGS" \
+ ] \
]
}
@@ -1317,24 +1335,6 @@ if { [isnative] && [which $CC] != 0 } {
"pr20800" \
"pass.out" \
] \
- [list \
- "Run pr21481a" \
- "$NOPIE_LDFLAGS -Wl,-z,bndplt" \
- "" \
- { pr21481a.c pr21481b.S } \
- "pr21481a" \
- "pass.out" \
- "$NOPIE_CFLAGS" \
- ] \
- [list \
- "Run pr21481b" \
- "$NOPIE_LDFLAGS -Wl,-z,bndplt,-z,now" \
- "" \
- { pr21481a.c pr21481b.S } \
- "pr21481b" \
- "pass.out" \
- "$NOPIE_CFLAGS" \
- ] \
]
}
--
2.9.3