aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2021-01-27 09:44:19 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-01-27 09:44:19 +0000
commitdf359a25ba6f6bda06104229fbfe284c1fb30915 (patch)
tree5d4f5a2617f449ad9d3ef2322f842ff363cd6c9a
parent3725ee39dbd4d7c17fc276b3ea4248cc16e4b522 (diff)
downloadglibc-df359a25ba6f6bda06104229fbfe284c1fb30915.zip
glibc-df359a25ba6f6bda06104229fbfe284c1fb30915.tar.gz
glibc-df359a25ba6f6bda06104229fbfe284c1fb30915.tar.bz2
Revert "Make libc symbols hidden in static PIE" [BZ #27237]
This reverts commit 2682695e5c7acf1e60dd3b5c3a14d4e82416262c. Fixes bug 27237. That commit turned out to be too intrusive affecting crt files, test system and benchmark files. They should not be affected, but the build system does not set the MODULE_NAME and LIBC_NONSHARED reliably.
-rw-r--r--include/libc-symbols.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index f4dd735..ea126ae 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -434,18 +434,13 @@ for linking")
strong_alias(real, name)
#endif
-#if defined SHARED || defined LIBC_NONSHARED
+#if defined SHARED || defined LIBC_NONSHARED \
+ || (BUILD_PIE_DEFAULT && IS_IN (libc))
# define attribute_hidden __attribute__ ((visibility ("hidden")))
#else
# define attribute_hidden
#endif
-/* Mark all symbols hidden in static PIE libc to avoid GOT indirections. */
-#if BUILD_PIE_DEFAULT && !defined NO_HIDDEN_EXTERN_FUNC_IN_PIE \
- && IS_IN (libc) && !defined LIBC_NONSHARED
-# pragma GCC visibility push(hidden)
-#endif
-
#define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
#define attribute_relro __attribute__ ((section (".data.rel.ro")))