[PATCH v2] elf: Support DT_RELR relative relocation format [BZ #27924]
Joseph Myers
joseph@codesourcery.com
Mon Oct 18 23:00:03 GMT 2021
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.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Binutils
mailing list