public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Fangrui Song <i@maskray.me>
Cc: Alexander Monakov <amonakov@ispras.ru>,
	GNU C Library <libc-alpha@sourceware.org>,
	 Binutils <binutils@sourceware.org>
Subject: Re: [PATCH v2 0/9] ld: Implement DT_RELR for x86
Date: Wed, 12 Jan 2022 19:00:28 -0800	[thread overview]
Message-ID: <CAMe9rOp_+VaUpo8D-G78pyeWw6QSaNcVMUFdUmvVEGziQ327Dg@mail.gmail.com> (raw)
In-Reply-To: <20220113025404.tknedakxqpexjxvq@gmail.com>

On Wed, Jan 12, 2022 at 6:54 PM Fangrui Song <i@maskray.me> wrote:
>
> On 2022-01-09, Alexander Monakov wrote:
> >On Sat, 8 Jan 2022, Fangrui Song wrote:
> >
> >> Thank you so much for the heroic work.
> >> I cannot think of other items.
> >
> >I am bummed that Rich Felker's solution for compatibility (sane diagnostic
> >for loading a new PIE/DSO with old ld.so) was not accepted:
> >https://sourceware.org/pipermail/libc-alpha/2021-November/133313.html
> >
> >(add just one new relocation to indicate presence of SHT_RELR)
> >
> >It would have been a nice solution that works the same across all OS'es,
> >without requiring changes in ld.so. Was there something wrong with it?
> >
> >Alexander
>
> Hi Alexander, I think the .gnu.version_r approach is better.
> For FreeBSD/musl/etc, there is no version node called GLIBC_2*,
> ld.bfd -z pack-relative-relocs will not add anything.
>
> For a relocation approach, every psABI needs to define which relocation
> type is used as the available indicator (something like
> R_*_GNU_VTENTRY). It's too much work for something only glibc needs.
>
>
>
> Now that the ld patch series has landed on
> https://sourceware.org/git/?p=binutils-gdb.git, what's the next step for the
> glibc patch? The current diff I have is
> https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/maskray/relr
> I think making ld.so/libc.so themselves compatible with DT_RELR can
> be separate changes (I personally do not know enough ld.so to contribute
> it...)

It is too late for glibc 2.35.  It should go in after 2.35 is branched.
My DT_RELR branch is based on your patch:

https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/relr/master

My branch requires -z pack-relative-relocs to enable DT_RELR
and supports zero DT_RELA/DT_REL values generated by ld.

-- 
H.J.

  reply	other threads:[~2022-01-13  3:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-08 18:38 H.J. Lu
2022-01-08 18:38 ` [PATCH v2 1/9] elf: Add .relr.dyn to special_sections_r H.J. Lu
2022-01-08 18:38 ` [PATCH v2 2/9] elf: Extract _bfd_elf_process_reverse_copy H.J. Lu
2022-01-08 18:38 ` [PATCH v2 3/9] elf: Pass need_layout to _bfd_elf_map_sections_to_segments H.J. Lu
2022-01-08 18:38 ` [PATCH v2 4/9] ld: Initial DT_RELR support H.J. Lu
2022-01-08 18:38 ` [PATCH v2 5/9] elf: Add size_relative_relocs and finish_relative_relocs H.J. Lu
2022-01-08 18:38 ` [PATCH v2 6/9] elf: Support DT_RELR in linker tests H.J. Lu
2022-01-08 18:38 ` [PATCH v2 7/9] x86: Add DT_RELR support H.J. Lu
2022-01-08 18:38 ` [PATCH v2 8/9] ld: Add simple DT_RELR tests H.J. Lu
2022-01-08 18:38 ` [PATCH v2 9/9] ld: Add glibc dependency for DT_RELR H.J. Lu
2022-01-10 15:31   ` Florian Weimer
2022-01-10 15:40     ` H.J. Lu
2022-01-10 15:42       ` Florian Weimer
2022-01-08 21:53 ` [PATCH v2 0/9] ld: Implement DT_RELR for x86 Fangrui Song
2022-01-09  8:13   ` Alexander Monakov
2022-01-13  2:54     ` Fangrui Song
2022-01-13  3:00       ` H.J. Lu [this message]
2022-01-11 10:13 ` Nick Clifton
2022-01-11 14:08   ` H.J. Lu
2022-01-12 12:33     ` Nick Clifton

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=CAMe9rOp_+VaUpo8D-G78pyeWw6QSaNcVMUFdUmvVEGziQ327Dg@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=amonakov@ispras.ru \
    --cc=binutils@sourceware.org \
    --cc=i@maskray.me \
    --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).