diff options
author | Fangrui Song <maskray@google.com> | 2022-04-26 09:26:22 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2022-04-26 09:26:22 -0700 |
commit | 098a657fe449a217cf65c5270d5fbc8d40b5b4e6 (patch) | |
tree | 3721fb17b7746c4dfbe411439f84699f7e6c17a3 /sysdeps/powerpc/powerpc32 | |
parent | e465d97653311c3687aee49de782177353acfe86 (diff) | |
download | glibc-098a657fe449a217cf65c5270d5fbc8d40b5b4e6.tar.gz glibc-098a657fe449a217cf65c5270d5fbc8d40b5b4e6.tar.xz glibc-098a657fe449a217cf65c5270d5fbc8d40b5b4e6.zip |
elf: Replace PI_STATIC_AND_HIDDEN with opposite HIDDEN_VAR_NEEDS_DYNAMIC_RELOC
PI_STATIC_AND_HIDDEN indicates whether accesses to internal linkage variables and hidden visibility variables in a shared object (ld.so) need dynamic relocations (usually R_*_RELATIVE). PI (position independent) in the macro name is a misnomer: a code sequence using GOT is typically position-independent as well, but using dynamic relocations does not meet the requirement. Not defining PI_STATIC_AND_HIDDEN is legacy and we expect that all new ports will define PI_STATIC_AND_HIDDEN. Current ports defining PI_STATIC_AND_HIDDEN are more than the opposite. Change the configure default. No functional change. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/powerpc/powerpc32')
-rw-r--r-- | sysdeps/powerpc/powerpc32/configure | 3 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc32/configure.ac | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc32/configure b/sysdeps/powerpc/powerpc32/configure index 29cfd53e8b..551505327a 100644 --- a/sysdeps/powerpc/powerpc32/configure +++ b/sysdeps/powerpc/powerpc32/configure @@ -1,6 +1,9 @@ # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/powerpc/powerpc32. +$as_echo "#define HIDDEN_VAR_NEEDS_DYNAMIC_RELOC 1" >>confdefs.h + + # See whether GCC uses -msecure-plt. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -msecure-plt by default" >&5 $as_echo_n "checking for -msecure-plt by default... " >&6; } diff --git a/sysdeps/powerpc/powerpc32/configure.ac b/sysdeps/powerpc/powerpc32/configure.ac index 5d3a9b509d..2f0ea63e0d 100644 --- a/sysdeps/powerpc/powerpc32/configure.ac +++ b/sysdeps/powerpc/powerpc32/configure.ac @@ -1,6 +1,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/powerpc/powerpc32. +AC_DEFINE(HIDDEN_VAR_NEEDS_DYNAMIC_RELOC) + # See whether GCC uses -msecure-plt. AC_CACHE_CHECK(for -msecure-plt by default, libc_cv_ppc_secure_plt, [dnl echo 'int foo (void) { extern int bar; return bar; }' > conftest.c |