public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@aquilenet.fr>
To: Guy-Fleury Iteriteka <gfleury@disroot.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v2 3/3] htl: move pthread_self into libc
Date: Sun, 8 Jan 2023 20:53:41 +0100	[thread overview]
Message-ID: <20230108195341.celadv4qkwr65qis@begin> (raw)
In-Reply-To: <20230104084915.646092-4-gfleury@disroot.org>

Guy-Fleury Iteriteka via Libc-alpha, le mer. 04 janv. 2023 10:49:15 +0200, a ecrit:
> diff --git a/htl/pt-self.c b/htl/pt-self.c
> index e05ec69b..f8c0b144 100644
> --- a/htl/pt-self.c
> +++ b/htl/pt-self.c
> @@ -17,7 +17,7 @@
>     <https://www.gnu.org/licenses/>.  */
>  
>  #include <pthread.h>
> -
> +#include <shlib-compat.h>
>  #include <pt-internal.h>
>  
>  /* Return the thread ID of the calling thread.  */
> @@ -36,4 +36,13 @@ __pthread_self (void)
>    return self->thread;
>  }
>  
> -weak_alias (__pthread_self, pthread_self);
> +libc_hidden_def (__pthread_self)
> +versioned_symbol (libc, __pthread_self, pthread_self, GLIBC_2_37);
> +
> +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_37)
> +compat_symbol (libc, __pthread_self, pthread_self, GLIBC_2_12);
> +#endif



> +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_21, GLIBC_2_37)
> +compat_symbol (libc, __pthread_self, pthread_self, GLIBC_2_21);
> +#endif

I really believe this one should be

#if SHLIB_COMPAT (libc, GLIBC_2_21, GLIBC_2_37)
compat_symbol (libc, __pthread_self, pthread_self, GLIBC_2_21);
#endif

since version 2.21 of pthread_self was already in libc.

> diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
> index 4e3200ef..29b08e73 100644
> --- a/sysdeps/mach/hurd/i386/libc.abilist
> +++ b/sysdeps/mach/hurd/i386/libc.abilist
> @@ -28,6 +28,7 @@ GLIBC_2.11 mkostemps F
>  GLIBC_2.11 mkostemps64 F
>  GLIBC_2.11 mkstemps F
>  GLIBC_2.11 mkstemps64 F
> +GLIBC_2.12 pthread_self F
>  GLIBC_2.13 __fentry__ F
>  GLIBC_2.14 syncfs F
>  GLIBC_2.15 __fdelt_chk F

You also need to add __pthread_self which you removed from
libpthread.abilist. Really, run

make -C $src_dir/elf objdir=$PWD subdir=elf ..=../ $PWD/elf/check-abi-libc.out

and see the out file to check that you have gotten them right.

Samuel

  reply	other threads:[~2023-01-08 19:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04  8:49 [PATCH v2 0/3] htl: move some symbols " Guy-Fleury Iteriteka
2023-01-04  8:49 ` [PATCH v2 1/3] htl: move __pthtread_total " Guy-Fleury Iteriteka
2023-01-04  8:49 ` [PATCH v2 2/3] htl: move ___pthread_self " Guy-Fleury Iteriteka
2023-01-04  8:49 ` [PATCH v2 3/3] htl: move pthread_self " Guy-Fleury Iteriteka
2023-01-08 19:53   ` Samuel Thibault [this message]
2023-01-08 20:16     ` 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=20230108195341.celadv4qkwr65qis@begin \
    --to=samuel.thibault@aquilenet.fr \
    --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).