public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
	Binutils <binutils@sourceware.org>
Subject: Re: [PATCH v2] elf: Support DT_RELR relative relocation format [BZ #27924]
Date: Mon, 18 Oct 2021 16:36:55 -0700	[thread overview]
Message-ID: <CAMe9rOoinGTOYRxzXfwZznFCZAADk4pBt531V1SuDcZ_whNtkw@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2110182255130.139834@digraph.polyomino.org.uk>

On Mon, Oct 18, 2021 at 4:00 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Mon, 18 Oct 2021, H.J. Lu via Libc-alpha wrote:
>
> > On Mon, Oct 18, 2021 at 3:30 PM Joseph Myers <joseph@codesourcery.com> wrote:
> > >
> > > On Mon, 18 Oct 2021, H.J. Lu via Libc-alpha wrote:
> > >
> > > > If a binary requires a new glibc to run, running it with the old glibc will
> > > > lead to an ld.so diagnostic message.   DT_RELR shouldn't be different.
> > >
> > > My point is that in many cases (for example, a binary using a new flag as
> > > an argument to a function taking a flags argument) it *won't* lead to an
> > > ld.so diagnostic message, just to the relevant function call misbehaving
> > > at runtime.
> >
> > Do you have such a testcase?  It sounds like a glibc bug to me.
>
> We could take my recently submitted patch
> <https://sourceware.org/pipermail/libc-alpha/2021-October/131905.html> for
> printf %b and %B as an example of the sort of thing we haven't considered
> to need new symbol versions in the past.  If someone builds a program
> using any of about 70 printf-like functions (three times as many on
> powerpc64le because of long double variants) with a %b or %B format, it
> won't work correctly with older glibc versions, but the symbol versions
> won't prevent it from running on older glibc versions.  We haven't
> considered new printf/scanf/strftime/strfmon formats to need new symbol
> versions before (and if we did, there would be a lot of such versions in
> the printf case because there are a lot of printf-like functions).  (The
> strtol-like and scanf-like functions will need new symbol versions for the
> binary input changes because they will also affect the handling of base 2
> / base 0 input starting with 0b, i.e. change semantics of code that was
> already valid with previous glibc and standard versions.  But there are
> fewer such functions.)
>

Ideally when the new specifiers are used, it should require the new
glibc version.  Is there a way to do it?

-- 
H.J.

  reply	other threads:[~2021-10-18 23:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-17  0:50 Fangrui Song
2021-10-18 14:42 ` H.J. Lu
2021-10-18 16:16   ` Fāng-ruì Sòng
2021-10-18 17:28     ` H.J. Lu
2021-10-18 18:15       ` Fāng-ruì Sòng
2021-10-18 18:27         ` H.J. Lu
2021-10-18 19:19           ` Fāng-ruì Sòng
2021-10-18 19:44             ` H.J. Lu
2021-10-18 20:11               ` Fāng-ruì Sòng
2021-10-18 21:10                 ` Joseph Myers
2021-10-18 22:27                   ` H.J. Lu
2021-10-18 22:30                     ` Joseph Myers
2021-10-18 22:42                       ` H.J. Lu
2021-10-18 23:00                         ` Joseph Myers
2021-10-18 23:36                           ` H.J. Lu [this message]
2021-10-18 23:44                             ` Joseph Myers
2021-10-19  1:05                               ` H.J. Lu
2021-10-18 19:21       ` Joseph Myers
2021-10-18 19:45         ` H.J. Lu
2021-10-29 18:21 ` Carlos O'Donell
2021-10-29 18:36   ` H.J. Lu
2021-10-29 19:15     ` Fangrui Song
2021-10-29 18:38   ` Fāng-ruì Sòng
2021-10-29 19:35     ` Carlos O'Donell
2021-10-29 19:53       ` Adhemerval Zanella
2021-11-01  4:50         ` Fāng-ruì Sòng

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=CAMe9rOoinGTOYRxzXfwZznFCZAADk4pBt531V1SuDcZ_whNtkw@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --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).