From: H.J. Lu Date: Wed, 22 Jul 2015 10:35:47 +0000 (-0700) Subject: Mark global with hidden attribute X-Git-Tag: users/ARM/embedded-binutils-2_26-branch-2016q1~1295 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd78ea777c35c497fcc0f20d162789296dc0a44d;p=external%2Fbinutils.git Mark global with hidden attribute 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. PR gold/18628 * testsuite/ifuncdep2.c (global): Change protected to hidden. * testsuite/ifuncmod1.c (global): Likewise. * testsuite/ifuncmod5.c (global): Likewise. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index cd52db08..45daaa5 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2015-07-22 H.J. Lu + + PR gold/18628 + * testsuite/ifuncdep2.c (global): Change protected to hidden. + * testsuite/ifuncmod1.c (global): Likewise. + * testsuite/ifuncmod5.c (global): Likewise. + 2015-07-22 Alan Modra * aarch64.cc (try_fix_erratum_843419_optimized): Warning fix. 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)