From: Joseph Myers <joseph@codesourcery.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH 3/7] Add GLIBC_ABI_DT_RELR for DT_RELR support
Date: Fri, 4 Feb 2022 20:10:54 +0000 [thread overview]
Message-ID: <alpine.DEB.2.22.394.2202042008100.244210@digraph.polyomino.org.uk> (raw)
In-Reply-To: <CAMe9rOqmyxeRVwFcXyondcjSzMvG8_9AMeH0B_FY1SiX1HjKcg@mail.gmail.com>
On Fri, 4 Feb 2022, H.J. Lu via Libc-alpha wrote:
> In my cover letter, I said
>
> Binutils 2.38 supports DT_RELR on x86 with the -z report-relative-reloc
> option. When DT_RELR is enabled, ld adds a GLIBC_ABI_DT_RELR symbol
> version dependency on libc.so to outputs. The DT_RELR support is enabled
> in ld.so only if the linker supports -z report-relative-reloc option.
>
> and the first patch has
>
> # define ELF_DYNAMIC_RELOCATE(map, scope, lazy, consider_profile, skip_ifunc) \
> do { \
> int edr_lazy = elf_machine_runtime_setup ((map), (scope), (lazy), \
> (consider_profile)); \
> ELF_DYNAMIC_DO_REL ((map), (scope), edr_lazy, skip_ifunc); \
> ELF_DYNAMIC_DO_RELA ((map), (scope), edr_lazy, skip_ifunc);
> \
> + if (HAVE_DT_RELR && ((map) != &GL(dl_rtld_map) || DO_RTLD_BOOTSTRAP)) \
> + ELF_DYNAMIC_DO_RELR (map); \
> } while (0)
>
> If HAVE_DT_RELR is 0, DT_RELR is disabled.
It's important that glibc 2.36 supports the same executables and shared
libraries on a given platform, independent of the binutils version used to
build glibc. If any build of glibc 2.36 for some platform supports RELR
relocations, all builds of it for that platform must support such
relocations.
That means that configure tests for linker support can *only* affect
whether glibc is built to *use* such relocations itself - not whether it
supports loading executables and shared libraries that use them.
(You could also increase the minimum linker version for building glibc for
a given platform, but the RELR support is too recent for it to be a good
idea to make the minimum version new enough to include RELR support.)
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2022-02-04 20:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 18:09 [PATCH 0/7] Support DT_RELR relative relocation format H.J. Lu
2022-02-03 18:09 ` [PATCH 1/7] elf: Support DT_RELR relative relocation format [BZ #27924] H.J. Lu
2022-02-03 18:09 ` [PATCH 2/7] elf: Properly handle zero DT_RELA/DT_REL values H.J. Lu
2022-02-03 18:09 ` [PATCH 3/7] Add GLIBC_ABI_DT_RELR for DT_RELR support H.J. Lu
2022-02-04 19:53 ` Joseph Myers
2022-02-04 20:04 ` H.J. Lu
2022-02-04 20:10 ` Joseph Myers [this message]
2022-02-04 20:40 ` H.J. Lu
2022-02-04 21:01 ` Joseph Myers
2022-02-04 21:08 ` H.J. Lu
2022-02-04 23:58 ` Joseph Myers
2022-02-05 17:24 ` H.J. Lu
2022-02-03 18:09 ` [PATCH 4/7] x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE H.J. Lu
2022-02-03 18:09 ` [PATCH 5/7] x86: Define SUPPORT_DT_RELR H.J. Lu
2022-02-03 18:09 ` [PATCH 6/7] Add --disable-default-dt-relr H.J. Lu
2022-02-03 18:09 ` [PATCH 7/7] NEWS: Mention DT_RELR support H.J. Lu
2022-02-04 20:00 ` [PATCH 0/7] Support DT_RELR relative relocation format Joseph Myers
2022-02-04 20:08 ` H.J. Lu
2022-02-04 20:12 ` Joseph Myers
2022-02-04 20:32 ` Fangrui Song
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=alpine.DEB.2.22.394.2202042008100.244210@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=hjl.tools@gmail.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).