From: "H.J. Lu" <hjl.tools@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>,
Binutils <binutils@sourceware.org>
Subject: Re: RFC: Add GNU_PROPERTY_1_GLIBC_2_NEEDED
Date: Thu, 28 Oct 2021 07:17:05 -0700 [thread overview]
Message-ID: <CAMe9rOr3bt_oc12SQyKfDA282q8N87kbjzEsR=Ka8=96YpKU6w@mail.gmail.com> (raw)
In-Reply-To: <87k0hxkzrz.fsf@oldenburg.str.redhat.com>
On Thu, Oct 28, 2021 at 7:08 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > I am not sure if I am following your concerns. We have an ELF feature,
> > like DT_RELR, which is tied to a glibc version. The binary with DT_RELR
> > will crash with the older glibcs. And you DON'T want such a binary with
> > a dependency on the required glibc version. Can you tell me why?
>
> Historically, such features have not been tied to a glibc version. CET,
> DT_AUDIT, AArch64 variant PCS support, nearly arbitrary calling
> convention support on x86-64 all are not really version-specific (they
> have been backported to varying degrees), and those involve dynamic
> linker features.
>
> In contrast, if DT_RELR support is indicated by a GLIBC_2.35 version
> dependency, it is necessary to backport all of the GLIBC_2.35 symbol set
> as part of the DT_RELR backport. This means such backports are usually
> not feasible.
So you would like to backport DT_RELR.
> >> >> The problem that linkers and loaders ignore unknown types should be
> >> >> tackled in a different way, e.g. by flagging critical types in some way.
> >> >> See:
> >> >>
> >> >> Critical program headers and dynamic tags
> >> >> <https://groups.google.com/g/generic-abi/c/vdG_G4l3N-Y/m/SB3DurdbBAAJ>
> >> >>
> >> >
> >> > This won't help the existing ld.so binaries which this proposal
> >> > is addressing.
> >>
> >> We need to increase the ABI version once, to signal the requirement for
> >> critical tags checking.
> >>
> >
> > Which ABI version? .note.ABI-tag or EI_ABIVERSION? A binary linked
> > against glibc 2.40 without DT_RELR can run with glibc 2.34. But a binary
> > linked against glibc 2.30 with DT_RELR won't run with glibc 2.34 at all.
> > Increasing the ABI version doesn't solve the DT_RELR issue.
>
> The way EI_ABIVERSION works is that the link editor produces the minimum
> version needed by the features in the binary.
>
> So if the link editor DT_RELR, it would produce a DT_CRITICAL_DT tag for
> DT_RELR and set EI_ABIVERSION for critical DT tag support. Similar for
> other critical DT Tags. If no critical DT tags are used, an earlier
> EI_ABIVERSION can be used.
>
There is no DT_CRITICAL_DT support in the older glibcs. The only option
is EI_ABIVERSION and I don't think we need DT_CRITICAL_DT. We update
EI_ABIVERSION whenever there is a new feature added. I think it is one
missing piece in the original DT_RELR proposal.
--
H.J.
next prev parent reply other threads:[~2021-10-28 14:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 14:53 H.J. Lu
2021-10-26 15:25 ` Florian Weimer
2021-10-26 15:51 ` H.J. Lu
2021-10-26 18:39 ` v2: " H.J. Lu
2021-10-28 6:55 ` Florian Weimer
2021-10-28 13:37 ` H.J. Lu
2021-10-28 14:08 ` Florian Weimer
2021-10-28 14:17 ` H.J. Lu [this message]
2021-10-28 14:20 ` H.J. Lu
2021-10-29 18:11 ` Florian Weimer
2021-10-29 12:47 ` Michael Matz
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='CAMe9rOr3bt_oc12SQyKfDA282q8N87kbjzEsR=Ka8=96YpKU6w@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=fweimer@redhat.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).