On Tuesday 09 December 2008 10:01, Bernhard Reutner-Fischer wrote:
> >> I do not see any explanation what are these?
> >> 
> >> I do see that some of them are used from libpthread, but
> >> many are not (__libc_accept, __libc_getdomainname...).
> >> 
> >> One purpose I might imagine if to make sure you are using
> >> libc implementation of a function, not something from
> >> another library...
> >> 
> >IIRC, this is one of the reason.
> >
> >> Anyone knows better?
> >
> >probably these were intended to be used with
> >libc_hidden_proto/defs for avoing PLT entries
> >when called from within libc itself... but now
> >it should be the case any more.
> 
> All __libc_*() should be removed or, where needed, at least hidden.
>
> We need some few functions for "intimite" users such as libpthread (and
> perhaps librt). For these we will (resp NPTL probably already has or
> should have) add a dispatcher struct (think GLRO et al).

Why they can't use normal functions? [education time!]

Anyway. I found this post in glibc:
http://sources.redhat.com/ml/libc-hacker/2004-05/msg00001.html

2004-05-01  Jakub Jelinek  <[EMAIL PROTECTED]>

        * posix/Versions (libc): Remove __libc_wait, __libc_waitpid,
        __libc_pause, __libc_nanosleep, __libc_pread, __libc_pread64,
        __libc_pwrite64, __waitid and __pselect @@GLIBC_PRIVATE.
        * stdlib/Versions (libc): Remove __on_exit@@GLIBC_PRIVATE.
        * sysdeps/unix/sysv/linux/Versions (libc): Remove
        __libc_sigaction@@GLIBC_PRIVATE.
        * sysdeps/unix/sysv/linux/x86_64/Versions (libc): Remove
        __modify_ldt@@GLIBC_PRIVATE.
        * socket/Versions (libc): Remove __libc_accept, __libc_send,
        __libc_recvfrom, __libc_recvmsg, __libc_sendmsg, __libc_recv,
        __libc_sendto and __libc_connect @@GLIBC_PRIVATE.
        * stdio-common/Versions (libc): Remove
        _itoa_upper_digits@@GLIBC_PRIVATE.
        * resolv/Versions (libresolv): Remove __ns_samename@@GLIBC_PRIVATE.
        * misc/Versions (libc): Remove __libc_fsync, __libc_msync,
        __libc_readv and __libc_writev @@GLIBC_PRIVATE.
        * termios/Versions (libc): Remove __libc_tcdrain@@GLIBC_PRIVATE.
        * io/Versions (libc): Remove __libc_open, __libc_close, __libc_read,
        __libc_write, __libc_lseek, __libc_fcntl, __libc_open64 and
        __libc_lseek64 @@GLIBC_PRIVATE.
linuxthreads/
        * Versions (libc): Add __on_exit and __libc_sigaction.
nptl/
        * Versions (libpthread): Remove
        __pthread_cleanup_upto@@GLIBC_PRIVATE.
nptl_db/
        * thread_dbP.h (LOG): Use write instead of __libc_write.
linuxthreads_db/
        * thread_dbP.h (LOG): Use write instead of __libc_write.

so I decided it's fairly safe to remove them.

I did not remove:

__libc_sigaction, __libc_p{read,write}[64]
 way too many places to touch, decided to do it separately

__modify_ldt - !!?? only extern exists, but not the body?!

__ns_samename - it's a #define for ns_samename

__pthread_cleanup_upto - seems to be internal func


The removal patch is attached, maybe it is useful
for you Carmelo.

Yell at me if something broke.

If any fucntions need to be restored back, we need
to DOCUMENT why.
--
vda

Attachment: 6.patch.gz
Description: GNU Zip compressed data

_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to