[0/4] move some htl symbol into libc

Message ID 20221029120030.1448-1-gfleury@disroot.org
Headers
Series move some htl symbol into libc |

Message

Guy-Fleury Iteriteka Oct. 29, 2022, noon UTC
  Hello,

can you help me moving the pthread_self into libc as an
example so that i can go ahead and move others that are not difficult
for me.

pthread_equal is removed from libpthread.so but
with the patch for pthread_self is in both libc.so and libpthread.so.

this is libpthread.so
-------
         U ___pthread_self@GLIBC_PRIVATE
00006630 t __pthread_self
00006630 t pthread_self
-------

and this libc.so
-------
00000028 b __GI____pthread_self
00000028 B ___pthread_self
001cf570 T __pthread_self
001cf570 W pthread_self
-------

i was thinking that it is with this makefile rule
------
extra-B-pthread.so = -B$(common-objpfx)htl/
------
in htl/Makefile that will force the pthread_self inclusion.
that would explain why pthread_equal is remove because it is in 
sysdeps/htl/.

thanks.
Guy-Fleury Iteriteka (4):
  htl: move __pthread-total into libc.
  htl: move ___pthread_self to libc
  htl: move pthread_equal into libc
  htl: move pthread_self into libc

 htl/Makefile                              |  5 ++---
 htl/Versions                              | 11 ++++++-----
 htl/forward.c                             |  8 --------
 htl/pt-create.c                           |  6 ------
 htl/pt-initialize.c                       |  2 --
 htl/pt-internal.h                         |  1 +
 htl/pt-total.c                            | 23 +++++++++++++++++++++++
 sysdeps/htl/pthread-functions.h           |  4 ----
 sysdeps/mach/hurd/htl/pt-dep-self.c       | 22 ++++++++++++++++++++++
 sysdeps/mach/hurd/htl/pt-sysdep.c         |  2 +-
 sysdeps/mach/hurd/htl/pt-sysdep.h         |  3 +++
 sysdeps/mach/hurd/i386/libc.abilist       |  2 ++
 sysdeps/mach/hurd/i386/libpthread.abilist |  2 --
 13 files changed, 60 insertions(+), 31 deletions(-)
 create mode 100644 htl/pt-total.c
 create mode 100644 sysdeps/mach/hurd/htl/pt-dep-self.c
  

Comments

Samuel Thibault Nov. 1, 2022, 10:28 p.m. UTC | #1
Guy-Fleury Iteriteka via Libc-alpha, le sam. 29 oct. 2022 13:00:26 +0100, a ecrit:
> pthread_equal is removed from libpthread.so but
> with the patch for pthread_self is in both libc.so and libpthread.so.
> 
> this is libpthread.so
> -------
>          U ___pthread_self@GLIBC_PRIVATE
> 00006630 t __pthread_self
> 00006630 t pthread_self

I don't know why that would happen, but you can grep files in htl/ to
see where that is coming from exactly.

> i was thinking that it is with this makefile rule
> ------
> extra-B-pthread.so = -B$(common-objpfx)htl/

I don't actually why that is there.  It was probably cargo-culted and
probably it's worth trying to remove it.

Samuel
  
Samuel Thibault Nov. 2, 2022, 4:29 p.m. UTC | #2
Samuel Thibault, le mar. 01 nov. 2022 23:28:54 +0100, a ecrit:
> Guy-Fleury Iteriteka via Libc-alpha, le sam. 29 oct. 2022 13:00:26 +0100, a ecrit:
> > pthread_equal is removed from libpthread.so but
> > with the patch for pthread_self is in both libc.so and libpthread.so.
> > 
> > this is libpthread.so
> > -------
> >          U ___pthread_self@GLIBC_PRIVATE
> > 00006630 t __pthread_self
> > 00006630 t pthread_self
> 
> I don't know why that would happen, but you can grep files in htl/ to
> see where that is coming from exactly.

(I meant in the htl/ build tree, to make sure what .o file ends up
defining them)

Samuel
  
Guy-Fleury Iteriteka Nov. 2, 2022, 4:36 p.m. UTC | #3
On November 2, 2022 6:29:22 PM GMT+02:00, Samuel Thibault <samuel.thibault@aquilenet.fr> wrote:
>Samuel Thibault, le mar. 01 nov. 2022 23:28:54 +0100, a ecrit:
>> Guy-Fleury Iteriteka via Libc-alpha, le sam. 29 oct. 2022 13:00:26 +0100, a ecrit:
>> > pthread_equal is removed from libpthread.so but
>> > with the patch for pthread_self is in both libc.so and libpthread.so.
>> > 
>> > this is libpthread.so
>> > -------
>> >          U ___pthread_self@GLIBC_PRIVATE
>> > 00006630 t __pthread_self
>> > 00006630 t pthread_self
>> 
>> I don't know why that would happen, but you can grep files in htl/ to
>> see where that is coming from exactly.
>
>(I meant in the htl/ build tree, to make sure what .o file ends up
>defining them)
>
will check that. Thanks
>Samuel
  
Guy-Fleury Iteriteka Nov. 3, 2022, 8:51 a.m. UTC | #4
Hello,

On November 2, 2022 12:28:54 AM GMT+02:00, Samuel Thibault <samuel.thibault@aquilenet.fr> wrote:
>Guy-Fleury Iteriteka via Libc-alpha, le sam. 29 oct. 2022 13:00:26 +0100, a ecrit:
>> pthread_equal is removed from libpthread.so but
>> with the patch for pthread_self is in both libc.so and libpthread.so.
>> 
>> this is libpthread.so
>> -------
>> U ___pthread_self@GLIBC_PRIVATE
>> 00006630 t __pthread_self
>> 00006630 t pthread_self
>
>I don't know why that would happen, but you can grep files in htl/ to
>see where that is coming from exactly.
>
Sorry with a full rebuild it doesn't define in libpthread anymore. I will correct issue raised by Florian and send an update patch
>> i was thinking that it is with this makefile rule
>> ------
>> extra-B-pthread.so = -B$(common-objpfx)htl/
>
>I don't actually why that is there. It was probably cargo-culted and
>probably it's worth trying to remove it.
>
>Samuel