This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold] PATCH: PR gold/18628: gold IFUNC testsuite failures with GCC 5
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Cc: Cary Coutant <ccoutant at gmail dot com>
- Date: Tue, 14 Jul 2015 05:56:02 -0700
- Subject: [gold] PATCH: PR gold/18628: gold IFUNC testsuite failures with GCC 5
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
GCC 5 will generate a relocation for protected symbol:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
when compiling for a shared library. It is undefined to access protected
symbol in IFUNC selector function inside a shared library.
OK for master?
H.J.
----
PR gold/18628
* testsuite/ifuncdep2.c (global): Change protected to hidden.
* testsuite/ifuncmod1.c (global): Likewise.
* testsuite/ifuncmod5.c (global): Likewise.
---
gold/testsuite/ifuncdep2.c | 2 +-
gold/testsuite/ifuncmod1.c | 2 +-
gold/testsuite/ifuncmod5.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gold/testsuite/ifuncdep2.c b/gold/testsuite/ifuncdep2.c
index 758bae1..f2a11f1 100644
--- a/gold/testsuite/ifuncdep2.c
+++ b/gold/testsuite/ifuncdep2.c
@@ -2,7 +2,7 @@
#include "ifunc-sel.h"
-int global __attribute__ ((visibility ("protected"))) = -1;
+int global __attribute__ ((visibility ("hidden"))) = -1;
static int
one (void)
diff --git a/gold/testsuite/ifuncmod1.c b/gold/testsuite/ifuncmod1.c
index e3b37cb..8ee11f1 100644
--- a/gold/testsuite/ifuncmod1.c
+++ b/gold/testsuite/ifuncmod1.c
@@ -6,7 +6,7 @@
*/
#include "ifunc-sel.h"
-int global __attribute__ ((visibility ("protected"))) = -1;
+int global __attribute__ ((visibility ("hidden"))) = -1;
static int
one (void)
diff --git a/gold/testsuite/ifuncmod5.c b/gold/testsuite/ifuncmod5.c
index 9a08e8c..1fd815b 100644
--- a/gold/testsuite/ifuncmod5.c
+++ b/gold/testsuite/ifuncmod5.c
@@ -1,7 +1,7 @@
/* Test STT_GNU_IFUNC symbols without direct function call. */
#include "ifunc-sel.h"
-int global __attribute__ ((visibility ("protected"))) = -1;
+int global __attribute__ ((visibility ("hidden"))) = -1;
static int
one (void)
--
2.4.3