From: Carlos O'Donell <carlos@redhat.com>
To: Florian Weimer <fweimer@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] Do not use --hash-style=both for building glibc shared objects
Date: Fri, 29 Apr 2022 08:54:49 -0400 [thread overview]
Message-ID: <fd6bb713-4273-a0ca-af84-106a8bbbd6b4@redhat.com> (raw)
In-Reply-To: <87levo74rx.fsf@oldenburg.str.redhat.com>
On 4/29/22 03:00, Florian Weimer via Libc-alpha wrote:
> The comment indicates that --hash-style=both was used to maintain
> compatibility with static dlopen, but we had many internal ABI
> changes since then, so this compatiblity does not add value anymore.
>
> Tested on i686-linux-gnu and x86_64-linux-gnu. Built with
> build-many-glibcs.py.
Agreed. We absolutely don't need --hash-style=both, and even today I'd like to
see us phase out the old hash at some point.
LGTM.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> ---
> Makeconfig | 9 ---------
> Makerules | 7 -------
> config.make.in | 1 -
OK. That matches the 3 files that need changing.
> configure | 28 ----------------------------
> configure.ac | 16 ----------------
> 5 files changed, 61 deletions(-)
>
> diff --git a/Makeconfig b/Makeconfig
> index 0aa5fb0099..760f14e92f 100644
> --- a/Makeconfig
> +++ b/Makeconfig
> @@ -362,15 +362,6 @@ relro-LDFLAGS = -Wl,-z,relro
> LDFLAGS.so += $(relro-LDFLAGS)
> LDFLAGS-rtld += $(relro-LDFLAGS)
>
> -ifeq (yes,$(have-hash-style))
> -# For the time being we unconditionally use 'both'. At some time we
> -# should declare statically linked code as 'out of luck' and compile
> -# with --hash-style=gnu only.
> -hashstyle-LDFLAGS = -Wl,--hash-style=both
> -LDFLAGS.so += $(hashstyle-LDFLAGS)
> -LDFLAGS-rtld += $(hashstyle-LDFLAGS)
> -endif
> -
OK.
> ifeq (no,$(build-pie-default))
> pie-default = $(no-pie-ccflag)
> else # build-pie-default
> diff --git a/Makerules b/Makerules
> index 428464f092..354528b8c7 100644
> --- a/Makerules
> +++ b/Makerules
> @@ -557,13 +557,6 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
> -Wl,--verbose 2>/dev/null | \
> sed > $@T \
> -e '/^=========/,/^=========/!d;/^=========/d' \
> - $(if $(filter yes,$(have-hash-style)), \
> - -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
> - -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \
> - -e '/DATA_SEGMENT_ALIGN/{H;g}' \
> - , \
> - -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
> - ) \
OK. Remove filter.
> -e 's/^.*\*(\.dynbss).*$$/& \
> PROVIDE(__start___libc_freeres_ptrs = .); \
> *(__libc_freeres_ptrs) \
> diff --git a/config.make.in b/config.make.in
> index bf728c71c0..fff4c78dd0 100644
> --- a/config.make.in
> +++ b/config.make.in
> @@ -70,7 +70,6 @@ have-libcap = @have_libcap@
> have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
> fno-unit-at-a-time = @fno_unit_at_a_time@
> bind-now = @bindnow@
> -have-hash-style = @libc_cv_hashstyle@
> use-default-link = @use_default_link@
> have-cxx-thread_local = @libc_cv_cxx_thread_local@
> have-loop-to-function = @libc_cv_cc_loop_to_function@
> diff --git a/configure b/configure
> index 5a730dc5fc..716dc041b6 100755
> --- a/configure
> +++ b/configure
> @@ -622,7 +622,6 @@ libc_cv_cc_nofma
> libc_cv_mtls_dialect_gnu2
> fno_unit_at_a_time
> libc_cv_has_glob_dat
> -libc_cv_hashstyle
> libc_cv_fpie
> libc_cv_z_execstack
> ASFLAGS_config
> @@ -6194,33 +6193,6 @@ $as_echo "$libc_cv_fpie" >&6; }
>
>
>
> -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --hash-style option" >&5
> -$as_echo_n "checking for --hash-style option... " >&6; }
> -if ${libc_cv_hashstyle+:} false; then :
> - $as_echo_n "(cached) " >&6
> -else
> - cat > conftest.c <<EOF
> -int _start (void) { return 42; }
> -EOF
> -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
> - -fPIC -shared -o conftest.so conftest.c
> - -Wl,--hash-style=both -nostdlib 1>&5'
> - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
> - (eval $ac_try) 2>&5
> - ac_status=$?
> - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
> - test $ac_status = 0; }; }
> -then
> - libc_cv_hashstyle=yes
> -else
> - libc_cv_hashstyle=no
> -fi
> -rm -f conftest*
> -fi
> -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hashstyle" >&5
> -$as_echo "$libc_cv_hashstyle" >&6; }
> -
> -
> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5
> $as_echo_n "checking for GLOB_DAT reloc... " >&6; }
> if ${libc_cv_has_glob_dat+:} false; then :
> diff --git a/configure.ac b/configure.ac
> index a045f6608e..d08ad4d64e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1360,22 +1360,6 @@ LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpie=yes], [libc_cv_fpie=no])
>
> AC_SUBST(libc_cv_fpie)
>
> -AC_CACHE_CHECK(for --hash-style option,
> - libc_cv_hashstyle, [dnl
> -cat > conftest.c <<EOF
> -int _start (void) { return 42; }
> -EOF
> -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
> - -fPIC -shared -o conftest.so conftest.c
> - -Wl,--hash-style=both -nostdlib 1>&AS_MESSAGE_LOG_FD])
> -then
> - libc_cv_hashstyle=yes
> -else
> - libc_cv_hashstyle=no
> -fi
> -rm -f conftest*])
> -AC_SUBST(libc_cv_hashstyle)
> -
OK.
> AC_CACHE_CHECK(for GLOB_DAT reloc,
> libc_cv_has_glob_dat, [dnl
> cat > conftest.c <<EOF
>
--
Cheers,
Carlos.
prev parent reply other threads:[~2022-04-29 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-29 7:00 Florian Weimer
2022-04-29 12:54 ` Carlos O'Donell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd6bb713-4273-a0ca-af84-106a8bbbd6b4@redhat.com \
--to=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).