• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisioncd78ea777c35c497fcc0f20d162789296dc0a44d (tree)
Time2015-07-22 19:37:50
AuthorH.J. Lu <hjl.tools@gmai...>
CommiterH.J. Lu

Log Message

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.

Change Summary

Incremental Difference

--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,10 @@
1+2015-07-22 H.J. Lu <hongjiu.lu@intel.com>
2+
3+ PR gold/18628
4+ * testsuite/ifuncdep2.c (global): Change protected to hidden.
5+ * testsuite/ifuncmod1.c (global): Likewise.
6+ * testsuite/ifuncmod5.c (global): Likewise.
7+
18 2015-07-22 Alan Modra <amodra@gmail.com>
29
310 * aarch64.cc (try_fix_erratum_843419_optimized): Warning fix.
--- a/gold/testsuite/ifuncdep2.c
+++ b/gold/testsuite/ifuncdep2.c
@@ -2,7 +2,7 @@
22
33 #include "ifunc-sel.h"
44
5-int global __attribute__ ((visibility ("protected"))) = -1;
5+int global __attribute__ ((visibility ("hidden"))) = -1;
66
77 static int
88 one (void)
--- a/gold/testsuite/ifuncmod1.c
+++ b/gold/testsuite/ifuncmod1.c
@@ -6,7 +6,7 @@
66 */
77 #include "ifunc-sel.h"
88
9-int global __attribute__ ((visibility ("protected"))) = -1;
9+int global __attribute__ ((visibility ("hidden"))) = -1;
1010
1111 static int
1212 one (void)
--- a/gold/testsuite/ifuncmod5.c
+++ b/gold/testsuite/ifuncmod5.c
@@ -1,7 +1,7 @@
11 /* Test STT_GNU_IFUNC symbols without direct function call. */
22 #include "ifunc-sel.h"
33
4-int global __attribute__ ((visibility ("protected"))) = -1;
4+int global __attribute__ ((visibility ("hidden"))) = -1;
55
66 static int
77 one (void)