From 098a657fe449a217cf65c5270d5fbc8d40b5b4e6 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 26 Apr 2022 09:26:22 -0700 Subject: 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 --- sysdeps/arm/configure | 3 --- sysdeps/arm/configure.ac | 5 ----- 2 files changed, 8 deletions(-) (limited to 'sysdeps/arm') diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure index 431e843b2b..b40ce60461 100644 --- a/sysdeps/arm/configure +++ b/sysdeps/arm/configure @@ -1,9 +1,6 @@ # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/arm. -$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h - - # We check to see if the compiler and flags are # selecting the hard-float ABI and if they are then # we set libc_cv_arm_pcs_vfp to yes which causes diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac index 90cdd69c75..da078ce012 100644 --- a/sysdeps/arm/configure.ac +++ b/sysdeps/arm/configure.ac @@ -1,11 +1,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/arm. -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. This has been true since GCC 4.1, -dnl which is older than the minimum version required to build libc. -AC_DEFINE(PI_STATIC_AND_HIDDEN) - # We check to see if the compiler and flags are # selecting the hard-float ABI and if they are then # we set libc_cv_arm_pcs_vfp to yes which causes -- cgit 1.4.1