public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Revert "Make libc symbols hidden in static PIE" [BZ #27237]
@ 2021-01-27  9:52 Szabolcs Nagy
  2021-01-27 11:27 ` Adhemerval Zanella
  0 siblings, 1 reply; 2+ messages in thread
From: Szabolcs Nagy @ 2021-01-27  9:52 UTC (permalink / raw)
  To: libc-alpha

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.
---
 include/libc-symbols.h | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index f4dd735555..ea126ae70c 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")))
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Revert "Make libc symbols hidden in static PIE" [BZ #27237]
  2021-01-27  9:52 [PATCH] Revert "Make libc symbols hidden in static PIE" [BZ #27237] Szabolcs Nagy
@ 2021-01-27 11:27 ` Adhemerval Zanella
  0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella @ 2021-01-27 11:27 UTC (permalink / raw)
  To: Szabolcs Nagy, libc-alpha



On 27/01/2021 06:52, Szabolcs Nagy wrote:
> 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.
> ---
>  include/libc-symbols.h | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/include/libc-symbols.h b/include/libc-symbols.h
> index f4dd735555..ea126ae70c 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")))
> 

Ok for 2.33, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-27 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27  9:52 [PATCH] Revert "Make libc symbols hidden in static PIE" [BZ #27237] Szabolcs Nagy
2021-01-27 11:27 ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).