From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [RFC] elf: Implement filtering of symbols historically defined in libpthread
Date: Tue, 04 May 2021 08:55:52 +0200 [thread overview]
Message-ID: <875yzzyolj.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <87h7jqguew.fsf@oldenburg.str.redhat.com> (Florian Weimer via Libc-alpha's message of "Wed, 28 Apr 2021 20:01:43 +0200")
* Florian Weimer via Libc-alpha:
> Definitions of these symbols in libc expose bugs in existing binaries
> linked against earlier glibc versions. Therefore, hide these symbols
> for old binaries.
>
> The symbol list in sysdeps/nptl/dl-pthread-weak.c contains some
> symbols which have not been moved yet, but that is harmless because
> the function is only invoked if the symbol is found in libc.so.
>
> The test suite passes on i686-gnu-linux, powerpc64-linux-gnu,
> x86_64-linux-gnu with these changes.
>
> Is this the direction we want to go in? Then I'm going to add test
> cases, probably using assembler.
>
> Personally I think it's not *too* bad, also not particularly nice
> either. elf/dl-pthread-weak.os brings in 2-3 KiB of code (but few
> run-time relocations). One possibility I have not mentioned in the
> comment is to put the moved symbols into a GLIBCPTHREAD_2.34 symbol
> version and use the presence of this version on the chain as an
> indicator that the symbol uses special treatment. This eliminates the
> separate string table. The downside is that we cannot easily add more
> symbols if we discover some are missing. This happened to me during
> development with pthread_mutexattr_gettype, which is a GLIBC_2.1 symbol
> and therefore not actually suitable for detecting the presence of
> libpthread (historically speaking). And it could happen again with
> thrd_exit (which is of course much younger).
I'd appreciate if someone could have a look at this patch in tell me if
the approach is reasonable, all things considered.
<https://sourceware.org/pipermail/libc-alpha/2021-April/125564.html>
Thanks,
Florian
next prev parent reply other threads:[~2021-05-04 6:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-28 18:01 [RFC] elf: Implement filtering of symbols historically defined in libpthread Florian Weimer via Libc-alpha
2021-05-04 6:55 ` Florian Weimer via Libc-alpha [this message]
2021-05-04 11:47 ` H.J. Lu via Libc-alpha
2021-05-04 12:04 ` Florian Weimer via Libc-alpha
2021-05-04 12:24 ` H.J. Lu via Libc-alpha
2021-05-04 12:27 ` Florian Weimer via Libc-alpha
2021-05-04 12:30 ` H.J. Lu via Libc-alpha
2021-05-04 12:33 ` Florian Weimer via Libc-alpha
2021-05-04 12:36 ` H.J. Lu via Libc-alpha
2021-05-04 12:43 ` Florian Weimer via Libc-alpha
2021-05-04 13:06 ` H.J. Lu via Libc-alpha
2021-05-04 13:13 ` Florian Weimer via Libc-alpha
2021-05-04 13:28 ` H.J. Lu via Libc-alpha
2021-05-04 12:59 ` Adhemerval Zanella via Libc-alpha
2021-05-04 21:08 ` Carlos O'Donell via Libc-alpha
2021-05-04 13:08 ` Andreas Schwab
2021-05-04 16:52 ` Florian Weimer via Libc-alpha
2021-05-04 21:28 ` Carlos O'Donell via Libc-alpha
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875yzzyolj.fsf@oldenburg.str.redhat.com \
--to=libc-alpha@sourceware.org \
--cc=fweimer@redhat.com \
--cc=schwab@linux-m68k.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).