public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH 0/7] Support DT_RELR relative relocation format
Date: Fri, 4 Feb 2022 12:32:00 -0800	[thread overview]
Message-ID: <20220204203200.gksmxt2acrvukh6a@google.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2202041955450.244210@digraph.polyomino.org.uk>

On 2022-02-04, Joseph Myers wrote:
>On Thu, 3 Feb 2022, H.J. Lu via Libc-alpha wrote:
>
>> DT_RELR is enabled in glibc shared libraries and position independent
>> executables (PIE) automatically if linker supports -z pack-relative-relocs
>> nd the architecture defines SUPPORT_DT_RELR in config.h.  At the moment,
>> only x86 targets define SUPPORT_DT_RELR.
>
>The patch 1 description says "This patch is simpler than Chrome OS's glibc
>patch and makes ELF_DYNAMIC_DO_RELR available to all ports.".
>
>What exactly would other architectures need to add in glibc to provide
>RELR support, since I don't see any actual architecture-specific code in
>this patch series outside of configure scripts?  Please provide text you
>would propose to add to https://sourceware.org/glibc/wiki/PortStatus that
>gives an architecture maintainer all the information needed to add such
>support for their architecture.  If in fact no architecture-specific code
>should be needed, please remove the SUPPORT_DT_RELR handling and just
>allow glibc to support the feature for all architectures (while using RELR
>in glibc itself for architectures where the linker support is present, as
>detected by a configure test on the linker rather than hardcoding
>information about which architectures have that linker support at a given
>time).
>
>The default should be to support a feature for all architectures.  A patch
>series supporting a feature for only some architectures needs a positive
>reason for excluding other architectures (for example, that each
>architecture needs architecture-specific code, for which you provide
>suitable documentation to add to PortStatus to help architecture
>maintainers in writing such code).

The patch series mix two things.

"elf: Support DT_RELR relative relocation format [BZ #27924]" allows
user programs to use DT_RELR. This is the main benefit.

AIUI the other patches are to allow x86-64 libc.so.6 to be built with
DT_RELR. This is more for dogfooding purposes and helps binutils port
maintainers confirm their ld.bfd support handles some uncommon cases
(glibc shared objects).

The second part needs a https://sourceware.org/glibc/wiki/PortStatus
entry.

---

(Personally I'd prefer separate patches.
But with some frustration on
https://sourceware.org/pipermail/libc-alpha/2021-November/133009.html
I don't care in what form glibc will get DT_RELR support...
and I really appreciate that H.J contributed the ld.bfd support and
drives this glibc effort.
)

      parent reply	other threads:[~2022-02-04 20:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 18:09 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
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 [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=20220204203200.gksmxt2acrvukh6a@google.com \
    --to=maskray@google.com \
    --cc=hjl.tools@gmail.com \
    --cc=joseph@codesourcery.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).