From 3ee318c9233ce77dee099f2830e8e29a0c572ca7 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 4 Apr 2022 17:19:07 -0700 Subject: Remove -z combreloc and HAVE_Z_COMBRELOC -z combreloc has been the default regadless of the architecture since binutils commit f4d733664aabd7bd78c82895e030ec9779a92809 (2002). The configure check added in commit fdde83499a05 (2001) has long been unneeded. We can therefore treat HAVE_Z_COMBRELOC as always 1 and delete dead code paths in dl-machine.h files (many were copied from commit a711b01d34ca and ee0cb67ec238). Reviewed-by: Adhemerval Zanella --- configure.ac | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index fa7d3c025b..b6a747dece 100644 --- a/configure.ac +++ b/configure.ac @@ -1324,37 +1324,6 @@ if test $libc_cv_as_noexecstack = yes; then fi AC_SUBST(ASFLAGS_config) -AC_CACHE_CHECK(for -z combreloc, - libc_cv_z_combreloc, [dnl -cat > conftest.c <&AS_MESSAGE_LOG_FD]) -then -dnl The following test is a bit weak. We must use a tool which can test -dnl cross-platform since the gcc used can be a cross compiler. Without -dnl introducing new options this is not easily doable. Instead use a tool -dnl which always is cross-platform: readelf. To detect whether -z combreloc -dnl look for a section named .rel.dyn or .rela.dyn. - if $READELF -S conftest.so | grep -E '.rela?.dyn' > /dev/null; then - libc_cv_z_combreloc=yes - else - libc_cv_z_combreloc=no - fi -else - libc_cv_z_combreloc=no -fi -rm -f conftest*]) -if test "$libc_cv_z_combreloc" = yes; then - AC_DEFINE(HAVE_Z_COMBRELOC) -fi -AC_SUBST(libc_cv_z_combreloc) - LIBC_LINKER_FEATURE([-z execstack], [-Wl,-z,execstack], [libc_cv_z_execstack=yes], [libc_cv_z_execstack=no]) AC_SUBST(libc_cv_z_execstack) -- cgit 1.4.1