From: Florian Weimer <fw@deneb.enyo.de>
To: Guy-Fleury Iteriteka via Libc-alpha <libc-alpha@sourceware.org>
Cc: Guy-Fleury Iteriteka <gfleury@disroot.org>
Subject: Re: [PATCH 4/4] htl: move pthread_self into libc
Date: Mon, 31 Oct 2022 08:24:59 +0100 [thread overview]
Message-ID: <87cza8jvzo.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <20221029120030.1448-5-gfleury@disroot.org> (Guy-Fleury Iteriteka via Libc-alpha's message of "Sat, 29 Oct 2022 13:00:30 +0100")
* Guy-Fleury Iteriteka via Libc-alpha:
> diff --git a/htl/Versions b/htl/Versions
> index 1ef8a6d0..59070181 100644
> --- a/htl/Versions
> +++ b/htl/Versions
> @@ -25,7 +25,9 @@ libc {
> GLIBC_2.32 {
> thrd_current; thrd_equal; thrd_sleep; thrd_yield;
> }
> -
> + GLIBC_2.36 {
> + __pthread_self;
> + }
This needs to be GLIBC_2.37 now. I think it also needs to be
pthread_self (the public symbol).
> diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
> index 26552958..bfa47282 100644
> --- a/sysdeps/mach/hurd/i386/libc.abilist
> +++ b/sysdeps/mach/hurd/i386/libc.abilist
> @@ -29,6 +29,7 @@ GLIBC_2.11 mkostemps64 F
> GLIBC_2.11 mkstemps F
> GLIBC_2.11 mkstemps64 F
> GLIBC_2.12 pthread_equal F
> +GLIBC_2.12 pthread_self F
> GLIBC_2.13 __fentry__ F
> GLIBC_2.14 syncfs F
> GLIBC_2.15 __fdelt_chk F
“GLIBC_2.37 pthread_self” needs to show up there, in addition to the
GLIBC_2.12 version.
What's missing from this change is the construct for setting the
symbol versions, something like:
versioned_symbol (libc, __pthread_self, pthread_self, GLIBC_2_37);
#if OTHER_SHLIB_COMPAT (librt, GLIBC_2_12, GLIBC_2_37)
compat_symbol (libc, __pthread_self, pthread_self, GLIBC_2_12);
#endif
This sets the new symbol version explicitly and provides the old
version as a compatibility symbol.
It may be necessary to introduce a hidden prototype for
__pthread_self, to avoid check-localplt warnings. You may have to use
libc_hidden_ver and a different name in the C function definition to
work around some symbol management limitations. Another approach
could use an inline function for pthread_self or __pthread_self, so
that glibc-internal use of the symbol goes away completely.
Use of a __thread variable for ___pthread_self is problematic because
it interferes with dlmopen. If you use THREAD_GETMEM instead, I
believe you can do away with the conditional check in pthread_self.
next prev parent reply other threads:[~2022-10-31 7:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-29 12:00 [PATCH 0/4] move some htl symbol " Guy-Fleury Iteriteka
2022-10-29 12:00 ` [PATCH 1/4] htl: move __pthread-total " Guy-Fleury Iteriteka
2022-10-29 12:00 ` [PATCH 2/4] htl: move ___pthread_self to libc Guy-Fleury Iteriteka
2022-10-29 12:00 ` [PATCH 3/4] htl: move pthread_equal into libc Guy-Fleury Iteriteka
2022-10-30 21:51 ` Samuel Thibault
2022-10-29 12:00 ` [PATCH 4/4] htl: move pthread_self " Guy-Fleury Iteriteka
2022-10-31 7:24 ` Florian Weimer [this message]
2022-11-01 19:19 ` Guy-Fleury Iteriteka
2022-11-01 22:28 ` [PATCH 0/4] move some htl symbol " Samuel Thibault
2022-11-02 16:29 ` Samuel Thibault
2022-11-02 16:36 ` Guy-Fleury Iteriteka
2022-11-03 8:51 ` Guy-Fleury Iteriteka
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=87cza8jvzo.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=gfleury@disroot.org \
--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).