aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2022-04-04 17:19:07 -0700
committerFangrui Song <maskray@google.com>2022-04-04 17:19:07 -0700
commit3ee318c9233ce77dee099f2830e8e29a0c572ca7 (patch)
tree06a550c27bc52f0edab75f7f900ef32112a7eae2 /configure.ac
parent1c225a2dd16f20d7fb04157b4ac8a3f284bd686a (diff)
downloadglibc-3ee318c9233ce77dee099f2830e8e29a0c572ca7.zip
glibc-3ee318c9233ce77dee099f2830e8e29a0c572ca7.tar.gz
glibc-3ee318c9233ce77dee099f2830e8e29a0c572ca7.tar.bz2
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 <adhemerval.zanella@linaro.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 0 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac
index fa7d3c0..b6a747d 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 <<EOF
-extern int bar (int);
-extern int mumble;
-int foo (void) { return bar (mumble); }
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
- -fPIC -shared $no_ssp -o conftest.so conftest.c
- -nostdlib -nostartfiles
- -Wl,-z,combreloc 1>&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)