public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "arek at hiler dot eu" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug build/29456] missing DT_HASH section in shared objects
Date: Mon, 08 Aug 2022 15:08:32 +0000	[thread overview]
Message-ID: <bug-29456-131-9ihOgiLwnA@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29456-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29456

--- Comment #8 from Arkadiusz Hiler <arek at hiler dot eu> ---
(In reply to Florian Weimer from comment #6)
> > Do you know why distros do this?
> 
> sysv hashing is much slower for symbol binding because we have to do a
> strcmp even on lookup failure. The Bloom filter is missing, too. Once the
> glibc dynamic linker supported it, I think distributions really wanted to
> use it, even if binutils and GCC defaults had not caught up at that point
> yet. It fixes real issues around startup performance.

I've read through both algorithms and seen the benchmarks / original
discussion around the new hash algorithm. The new one is unquestionably
superior.

I don't understand why people forced "gnu" instead of "both" though.
>From my point of view, as an outsider, it looks like people hopped on the
feature a bit early overriding upstream defaults and it has stuck.

If they would not have carried over `--with-linker-hash-style=gnu` from
that era we would respect linker's default, which is both for The GNU
Linker.

As far as I understand there's small size increase and no real performance
penalty caused by having both.

This is mostly besides the point though and doesn't affect the perceived
breakage, but I appreciate having the historical context.

(In reply to Adhemerval Zanella from comment #7)
> Right, however, I am not sure this characterize as an ABI break since the
> symbol lookup information would be indeed provided (albeit in a different
> format). And it should be transparent to most applications as well since
> symbol resolution is done by the loader itself.

The glibc loader is not the only thing that can do symbol resolution, and
software that ships with distros is not the only software out there.
Changing the section name and the format is significant. All the historical
software that uses old version of dlsym() that's linked in to use pthreads
would break.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-08-08 15:08 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08  9:10 [Bug build/29456] New: " arek at hiler dot eu
2022-08-08  9:39 ` [Bug build/29456] " mikhail.v.gavrilov at gmail dot com
2022-08-08 10:45 ` fweimer at redhat dot com
2022-08-08 11:33 ` arek at hiler dot eu
2022-08-08 12:01 ` fweimer at redhat dot com
2022-08-08 12:43 ` adhemerval.zanella at linaro dot org
2022-08-08 14:34 ` arek at hiler dot eu
2022-08-08 14:45 ` fweimer at redhat dot com
2022-08-08 14:49 ` adhemerval.zanella at linaro dot org
2022-08-08 15:08 ` arek at hiler dot eu [this message]
2022-08-08 15:29 ` adhemerval.zanella at linaro dot org
2022-08-08 16:49 ` arek at hiler dot eu
2022-08-08 17:13 ` adhemerval.zanella at linaro dot org
2022-08-08 17:32 ` adhemerval.zanella at linaro dot org
2022-08-08 19:58 ` sam at gentoo dot org
2022-08-08 19:58 ` sam at gentoo dot org
2022-08-09 16:12 ` freswa at archlinux dot org
2022-08-12  7:46 ` arek at hiler dot eu
2022-08-12 13:17 ` adhemerval.zanella at linaro dot org
2022-08-14 21:33 ` hi-angel at yandex dot ru
2022-08-24  4:12 ` i at maskray dot me
2022-08-24  8:28 ` rguenth at gcc dot gnu.org
2022-08-24  8:56 ` fweimer at redhat dot com
2022-08-24  8:57 ` mliska at suse dot cz
2023-08-11 15:40 ` es20490446e at gmail dot com
2023-08-11 15:58 ` carlos at redhat dot com

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=bug-29456-131-9ihOgiLwnA@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@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).