public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: Fangrui Song <maskray@google.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	Fangrui Song via Libc-alpha <libc-alpha@sourceware.org>,
	"H.J. Lu" <hjl.tools@gmail.com>, Rich Felker <dalias@libc.org>,
	Felix Yan <felixonmars@archlinux.org>,
	Sylvestre Ledru <sylvestre@debian.org>,
	Leah Neukirchen <leah@vuxu.org>
Subject: Re: Can DT_RELR catch up glibc 2.35?
Date: Wed, 24 Nov 2021 01:10:00 +0000	[thread overview]
Message-ID: <E583DAE0-B38D-41F3-B68E-F2858E112812@gentoo.org> (raw)
In-Reply-To: <20211118232700.vktq3tchmmlwcrwu@google.com>

[-- Attachment #1: Type: text/plain, Size: 1585 bytes --]



> On 18 Nov 2021, at 23:27, Fangrui Song <maskray@google.com> wrote:
> 
> (For newly CCed Linux distro folks, sorry for hijacking you here. Scroll
> to the end for my request from you.)
> 
> [snip]

> CCed a bunch of Linux distro folks (Arch/Debian/Gentoo/Void).
> 
> * ld.lld is not a default linker on most Linux distros.
> * ld.lld --pack-dyn-relocs=relr is an opt-in feature.
> * --pack-dyn-relocs=relr is difficult to misuse because GNU ld doesn't support it.
> * binutils may get relr support one day, but may take several releases.
> * Nobody will switch the GCC/Clang default any time soon.
> * Coping the new executable to an old glibc system is unsupported.
> 
> By enabling DT_RELR in upstream glibc, the Linux distros will get the
> glibc feature with ZERO overhead in their downstream packaging.  Then, a
> user opting in ld.lld --pack-dyn-relocs=relr will have smaller
> executables.  When GNU ld finally gets the feature, the benefit will
> reach more users. So why not having the feature to make the future
> feature enablement smoother?

FWIW, from our perspective in Gentoo (but it should apply to most/all Linux distros),
there's really no difference as long as the default isn't changed yet.

People are, as always, free to use custom flags and must understand their implications,
but they need to be careful when building on _any_ distro in _any_ environment anyway:
obviously building with newer glibc affects one's ability to run binaries on older targets
with an older glibc. It's not a new issue in that regard.

best,
sam

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 618 bytes --]

  parent reply	other threads:[~2021-11-24  1:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12  7:47 Fangrui Song
2021-11-16 21:07 ` Adhemerval Zanella
2021-11-17  0:26   ` H.J. Lu
2021-11-17 12:46     ` Adhemerval Zanella
2021-11-17 13:14       ` H.J. Lu
2021-11-18  0:30         ` Fangrui Song
2021-11-18  9:45           ` Florian Weimer
2021-11-18 23:27             ` Fangrui Song
2021-11-19 11:51               ` Adhemerval Zanella
2021-11-24  1:10               ` Sam James [this message]
2021-11-19 19:18           ` Rich Felker
2021-11-17 22:12   ` Florian Weimer
2021-11-18 12:45     ` Adhemerval Zanella

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=E583DAE0-B38D-41F3-B68E-F2858E112812@gentoo.org \
    --to=sam@gentoo.org \
    --cc=dalias@libc.org \
    --cc=felixonmars@archlinux.org \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=leah@vuxu.org \
    --cc=libc-alpha@sourceware.org \
    --cc=maskray@google.com \
    --cc=sylvestre@debian.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).