aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/hppa
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2022-04-26 09:26:22 -0700
committerFangrui Song <maskray@google.com>2022-04-26 09:26:22 -0700
commit098a657fe449a217cf65c5270d5fbc8d40b5b4e6 (patch)
tree3721fb17b7746c4dfbe411439f84699f7e6c17a3 /sysdeps/hppa
parente465d97653311c3687aee49de782177353acfe86 (diff)
downloadglibc-098a657fe449a217cf65c5270d5fbc8d40b5b4e6.zip
glibc-098a657fe449a217cf65c5270d5fbc8d40b5b4e6.tar.gz
glibc-098a657fe449a217cf65c5270d5fbc8d40b5b4e6.tar.bz2
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/hppa')
-rw-r--r--sysdeps/hppa/configure3
-rw-r--r--sysdeps/hppa/configure.ac2
2 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure
index cf5acf9..ebb42c5 100644
--- a/sysdeps/hppa/configure
+++ b/sysdeps/hppa/configure
@@ -32,6 +32,9 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+$as_echo "#define HIDDEN_VAR_NEEDS_DYNAMIC_RELOC 1" >>confdefs.h
+
+
# PIE builds fail on binutils 2.37 and earlier, see:
# https://sourceware.org/bugzilla/show_bug.cgi?id=28672
$as_echo "#define PIE_UNSUPPORTED 1" >>confdefs.h
diff --git a/sysdeps/hppa/configure.ac b/sysdeps/hppa/configure.ac
index 3e1c35b..5e59a63 100644
--- a/sysdeps/hppa/configure.ac
+++ b/sysdeps/hppa/configure.ac
@@ -20,6 +20,8 @@ fi
rm -f conftest*])
AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
+AC_DEFINE(HIDDEN_VAR_NEEDS_DYNAMIC_RELOC)
+
# PIE builds fail on binutils 2.37 and earlier, see:
# https://sourceware.org/bugzilla/show_bug.cgi?id=28672
AC_DEFINE(PIE_UNSUPPORTED)