diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-07-02 13:19:13 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-07-08 15:28:00 +0200 |
commit | a2f53a77559b610c8bf762c5d22172d9d45800e0 (patch) | |
tree | be4fbd7a144bcb5840be71d09ef117a55794f41a /configure.ac | |
parent | 9fc639f654dc004736836613be703e6bed0c36a8 (diff) | |
download | glibc-fw/bug31943-with-test.zip glibc-fw/bug31943-with-test.tar.gz glibc-fw/bug31943-with-test.tar.bz2 |
elf: Handle ld.so with LOAD segment gaps in _dl_find_object (bug 31943)fw/bug31943-with-test
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e48957f..4a952c1 100644 --- a/configure.ac +++ b/configure.ac @@ -526,6 +526,26 @@ case $($LD --version) in esac LIBC_CONFIG_VAR([with-lld], [$libc_cv_with_lld]) +dnl Workaround for binutils LOAD segment gaps bug (swbz#28743) +dnl Fixed in commit 9833b7757d246f22db4eb24b8e5db7eb5e05b6d9 +dnl ("PR28824, relro security issues"), part of binutils 2.39. +AC_ARG_WITH([ld_load_gaps], + [AS_HELP_STRING([--with-ld-load-gaps], + [support linker with LOAD segment gaps bug @<:@default=check@:>@])], + [], + [: m4_divert_text([DEFAULTS], [with_ld_load_gaps=check])]) +AS_IF([test "x$with_ld_load_gaps" = xcheck], + [echo "Checking binutils ld version:" >&AS_MESSAGE_LOG_FD + AS_IF([LC_ALL=C $LD --version | grep -E '^GNU ld version 2\.(2[[0-9]]|3[[0-8]])[[^0-9]]' >&AS_MESSAGE_LOG_FD], + [with_ld_load_gaps=yes], + [with_ld_load_gaps=no + echo "(linker not binutils or not impacted)" >&AS_MESSAGE_LOG_FD])]) +AS_IF([test "x$with_ld_load_gaps" != xyes && test "x$with_ld_load_gaps" != xno], + AC_MSG_ERROR([invalid --with-ld-load-gaps argument: $with_ld_load_gaps])) +AS_IF([test "x$with_ld_load_gaps" = xyes], + [AC_DEFINE(HAVE_LD_LOAD_GAPS)]) +AC_SUBST(with_ld_load_gaps) + # These programs are version sensitive. AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, [GNU Make[^0-9]*\([0-9][0-9.]*\)], |