public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "adhemerval.zanella at linaro dot org" <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 17:13:25 +0000	[thread overview]
Message-ID: <bug-29456-131-K4ChcUiy9Y@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 #11 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Arkadiusz Hiler from comment #10)
> (In reply to Adhemerval Zanella from comment #9)
> > It was done as size optimization from perceived unused features since
> > DT_GNU_HASH is being used as a default on most distros for a long time. 
> > 
> > On libc.so for x86_64, I see:
> > 
> > * with -Wl,--hash-style=both
> > $ size libc.so
> >    text    data     bss     dec     hex filename
> > 1992171   20320   55120 2067611  1f8c9b libc.so
> > 
> > * with -Wl,--hash-style=gnu
> >    text    data     bss     dec     hex filename
> > 1975923   20304   55120 2051347  1f4d13 libc.so
> > 
> > Roughly 1%, which is considerable for an unused feature.
> 
> ~16kB that's used by a whole class of games that are now unplayable on more
> bleeding-edge distros.
> 
> See: https://github.com/ValveSoftware/Proton/issues/6051
> 
> > So it does not make much sense to enforce DT_HASH on libc.so, especially if
> > users do want to do symbol resolution it is still provided by DT_GNU_HASH.
> > The glibc build now uses the default set by binutils, so maybe one option is
> > to enforce -Wl,--hash-style=both as distro level if this is really a
> > compatibility issue (since it might not be specific to glibc shared objects).
> 
> Shifting responsibility on downstream to maintain compatibility with
> something
> that glibc provided for years as the default and there are now users of it
> is not really feasible.
> 
> I don't think I can convince you. I really hoped it can be just a simple
> revert.
> The best I can do is to report that a thing used to work is now broken and
> point to a commit that caused it.

In fact, we take backward compatibility quite seriously, the main issue here is
what characterizes an ABI break and what kind of forward compatibility and
extra internal details changes we need to take care of.

I am not against revert this change, but it really odd that on all system
binaries we need to keep the sysv hash solely for glibc add eternum because a
specific tool where we do not really understand exactly why requires such
functionality, and it does not provide any extra function to glibc itself.

Does it also prevent us to add another possible HASH scheme in the future,
taking that EAC might break if it does see a DT_GNU_HASH?

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

  parent reply	other threads:[~2022-08-08 17:13 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
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 [this message]
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-K4ChcUiy9Y@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).