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/riscv/configure | 3 --- sysdeps/riscv/configure.ac | 2 -- 2 files changed, 5 deletions(-) (limited to 'sysdeps/riscv') diff --git a/sysdeps/riscv/configure b/sysdeps/riscv/configure index 4a56fca94b..2372225a26 100644 --- a/sysdeps/riscv/configure +++ b/sysdeps/riscv/configure @@ -1,9 +1,6 @@ # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/riscv/elf. -$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h - - # Check if static linker supports R_RISCV_ALIGN { $as_echo "$as_me:${as_lineno-$LINENO}: checking for R_RISCV_ALIGN linker relaxation support" >&5 $as_echo_n "checking for R_RISCV_ALIGN linker relaxation support... " >&6; } diff --git a/sysdeps/riscv/configure.ac b/sysdeps/riscv/configure.ac index 44a5279903..dbcc216689 100644 --- a/sysdeps/riscv/configure.ac +++ b/sysdeps/riscv/configure.ac @@ -1,8 +1,6 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/riscv/elf. -AC_DEFINE(PI_STATIC_AND_HIDDEN) - # Check if static linker supports R_RISCV_ALIGN AC_CACHE_CHECK([for R_RISCV_ALIGN linker relaxation support], [libc_cv_riscv_r_align],[dnl cat > conftest.S <