about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2021-08-10 11:04:56 -0700
committerFangrui Song <maskray@google.com>2021-08-10 11:04:56 -0700
commit302247c89121e8d4c7629e589edbb4974fff6edb (patch)
treed0af2abbabc149fac1e598639652b60ea5221c8a /configure.ac
parent13710e7e6af6c8965cc9a63a0660cb4ce1966557 (diff)
downloadglibc-302247c89121e8d4c7629e589edbb4974fff6edb.tar.gz
glibc-302247c89121e8d4c7629e589edbb4974fff6edb.tar.xz
glibc-302247c89121e8d4c7629e589edbb4974fff6edb.zip
elf: Unconditionally use __ehdr_start
We can consider __ehdr_start (from binutils 2.23 onwards)
unconditionally supported, since configure.ac requires binutils>=2.25.

The configure.ac check is related to an ia64 bug fixed by binutils 2.24.
See https://sourceware.org/pipermail/libc-alpha/2014-August/053503.html

Tested on x86_64-linux-gnu. Tested build-many-glibcs.py with
aarch64-linux-gnu and s390x-linux-gnu.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 0 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index 34ecbba540..af47cd51e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1662,40 +1662,6 @@ if test $libc_cv_predef_fortify_source = yes; then
 fi
 AC_SUBST(CPPUNDEFS)
 
-# Some linkers on some architectures support __ehdr_start but with
-# bugs.  Make sure usage of it does not create relocations in the
-# output (as the linker should resolve them all for us).
-AC_CACHE_CHECK([whether the linker provides working __ehdr_start],
-	       libc_cv_ehdr_start, [
-old_CFLAGS="$CFLAGS"
-old_LDFLAGS="$LDFLAGS"
-old_LIBS="$LIBS"
-CFLAGS="$CFLAGS -fPIC"
-LDFLAGS="$LDFLAGS -nostdlib -nostartfiles -shared $no_ssp"
-LIBS=
-AC_LINK_IFELSE([AC_LANG_SOURCE([
-typedef struct {
-  char foo;
-  long val;
-} Ehdr;
-extern const Ehdr __ehdr_start __attribute__ ((visibility ("hidden")));
-long ehdr (void) { return __ehdr_start.val; }
-])],
-	       [if $READELF -r conftest | grep -F __ehdr_start >/dev/null; then
-		  libc_cv_ehdr_start=broken
-		else
-		  libc_cv_ehdr_start=yes
-		fi], [libc_cv_ehdr_start=no])
-CFLAGS="$old_CFLAGS"
-LDFLAGS="$old_LDFLAGS"
-LIBS="$old_LIBS"
-])
-if test "$libc_cv_ehdr_start" = yes; then
-  AC_DEFINE([HAVE_EHDR_START])
-elif test "$libc_cv_ehdr_start" = broken; then
-  AC_MSG_WARN([linker is broken -- you should upgrade])
-fi
-
 dnl Starting with binutils 2.35, GAS can attach multiple symbol versions
 dnl to one symbol (PR 23840).
 AC_CACHE_CHECK(whether the assembler requires one version per symbol,