This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Get rid of > 35 GLIBC_PRIVATE unused exports


Hi!

@GLIBC_PRIVATE symbols are not supposed to be used by anything outside
of glibc.  There is a lot of GLIBC_PRIVATE symbols which are not ever
used by the binaries or shared libraries included in glibc though
and IMHO it is just a waste to export them.
The majority are __libc_* exports which historically were used by
LinuxThreads libpthread.so, but as that now includes the ptw-*.os
objects which provide them they are no longer needed.

I believe LinuxThreads should use <not-cancel.h> interfaces instead
in a couple of places and will submit that change as a separate patch.

2004-05-01  Jakub Jelinek  <jakub@redhat.com>

	* 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.

--- libc/nptl_db/thread_dbP.h.jj	2004-04-13 10:42:53.000000000 +0200
+++ libc/nptl_db/thread_dbP.h	2004-05-01 12:18:06.000000000 +0200
@@ -57,7 +57,7 @@ enum
 
 /* Comment out the following for less verbose output.  */
 #ifndef NDEBUG
-# define LOG(c) if (__td_debug) __libc_write (2, c "\n", strlen (c "\n"))
+# define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n"))
 extern int __td_debug attribute_hidden;
 #else
 # define LOG(c)
--- libc/posix/Versions.jj	2004-03-10 10:32:02.000000000 +0100
+++ libc/posix/Versions	2004-05-01 17:49:11.704564213 +0200
@@ -123,10 +123,6 @@ libc {
     regexec;
   }
   GLIBC_PRIVATE {
-    # functions which have an additional interface since they are
-    # are cancelable.
-    __libc_wait; __libc_waitpid; __libc_pause; __libc_nanosleep; __libc_fork;
-    __libc_pread; __libc_pread64; __libc_pwrite; __libc_pwrite64;
-    __waitid; __pselect;
+    __libc_fork; __libc_pwrite;
   }
 }
--- libc/stdlib/Versions.jj	2002-07-11 18:31:22.000000000 +0200
+++ libc/stdlib/Versions	2004-05-01 12:39:50.419988073 +0200
@@ -98,8 +98,5 @@ libc {
     # functions which have an additional interface since they are
     # are cancelable.
     __libc_system;
-
-    # functions used in other libraries.
-    __on_exit;
   }
 }
--- libc/sysdeps/unix/sysv/linux/Versions.jj	2004-03-23 15:51:49.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/Versions	2004-05-01 13:00:29.156990274 +0200
@@ -116,9 +116,6 @@ libc {
     sched_getaffinity; sched_setaffinity;
   }
   GLIBC_PRIVATE {
-    # needed by libpthread.
-    __libc_sigaction;
-
     # functions used in other libraries
     __syscall_rt_sigqueueinfo;
   }
--- libc/sysdeps/unix/sysv/linux/x86_64/Versions.jj	2002-08-23 11:29:01.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/Versions	2004-05-01 12:37:13.422124134 +0200
@@ -6,7 +6,4 @@ libc {
 
     modify_ldt;
   }
-  GLIBC_PRIVATE {
-    __modify_ldt;
-  }
 }
--- libc/socket/Versions.jj	2002-02-02 00:13:08.000000000 +0100
+++ libc/socket/Versions	2004-05-01 16:18:29.002967202 +0200
@@ -31,10 +31,4 @@ libc {
     # Addition from P1003.1-200x
     sockatmark;
   }
-  GLIBC_PRIVATE {
-    # functions which have an additional interface since they are
-    # cancelable.
-    __libc_accept; __libc_send; __libc_recvfrom;
-    __libc_recvmsg; __libc_sendmsg; __libc_recv; __libc_sendto; __libc_connect;
-  }
 }
--- libc/linuxthreads_db/thread_dbP.h.jj	2002-08-24 05:34:32.000000000 +0200
+++ libc/linuxthreads_db/thread_dbP.h	2004-05-01 12:19:02.000000000 +0200
@@ -31,7 +31,7 @@ enum
 
 /* Comment out the following for less verbose output.  */
 #ifndef NDEBUG
-# define LOG(c) if (__td_debug) __libc_write (2, c "\n", strlen (c "\n"))
+# define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n"))
 extern int __td_debug;
 #else
 # define LOG(c)
--- libc/nptl/Versions.jj	2004-03-22 14:45:55.000000000 +0100
+++ libc/nptl/Versions	2004-05-01 12:51:17.000000000 +0200
@@ -231,7 +231,7 @@ libpthread {
   }
 
   GLIBC_PRIVATE {
-    __pthread_initialize_minimal; __pthread_cleanup_upto;
+    __pthread_initialize_minimal;
     __pthread_clock_gettime; __pthread_clock_settime;
     __pthread_unwind;
   }
--- libc/signal/Versions.jj	2002-10-09 11:18:15.000000000 +0200
+++ libc/signal/Versions	2004-05-01 12:58:27.063870950 +0200
@@ -49,7 +49,4 @@ libc {
     # Needed to provide a pointer to the XPG sigpause function.
     __xpg_sigpause;
   }
-  GLIBC_PRIVATE {
-    __sigtimedwait; __sigwait; __sigwaitinfo;
-  }
 }
--- libc/stdio-common/Versions.jj	2002-02-02 00:13:35.000000000 +0100
+++ libc/stdio-common/Versions	2004-05-01 12:35:07.565679247 +0200
@@ -48,5 +48,5 @@ libc {
   }
   GLIBC_PRIVATE {
     # global variables
-    _itoa_lower_digits; _itoa_upper_digits;
+    _itoa_lower_digits;
 }
--- libc/linuxthreads/Versions.jj	2003-09-02 09:08:54.000000000 +0200
+++ libc/linuxthreads/Versions	2004-05-01 21:06:37.714604982 +0200
@@ -34,6 +34,8 @@ libc {
     __libc_sigpause; __libc_sigsuspend; __libc_sigwait; __libc_sigwaitinfo;
     __libc_waitid; __libc___xpg_sigpause; __librt_enable_asynccancel;
     __librt_disable_asynccancel; __librt_multiple_threads;
+
+    __libc_sigaction; __on_exit;
   }
 }
 
--- libc/resolv/Versions.jj	2004-02-23 09:46:49.000000000 +0100
+++ libc/resolv/Versions	2004-05-01 12:33:18.000000000 +0200
@@ -75,7 +75,7 @@ libresolv {
   GLIBC_PRIVATE {
     # Needed in libnss_dns.
     __ns_name_unpack; __ns_name_ntop;
-    __ns_get16; __ns_samename;
+    __ns_get16;
     __libc_res_nquery; __libc_res_nsearch;
   }
 }
--- libc/misc/Versions.jj	2003-03-03 10:47:42.000000000 +0100
+++ libc/misc/Versions	2004-05-01 16:20:11.293635383 +0200
@@ -130,10 +130,4 @@ libc {
   GLIBC_2.3.3 {
     remap_file_pages;
   }
-  GLIBC_PRIVATE {
-    # functions which have an additional interface since they are
-    # cancelable.
-    __libc_fsync; __libc_msync;
-    __libc_readv; __libc_writev;
-  }
 }
--- libc/termios/Versions.jj	2002-02-02 00:16:47.000000000 +0100
+++ libc/termios/Versions	2004-05-01 17:49:36.828061755 +0200
@@ -11,9 +11,4 @@ libc {
     # t*
     tcgetsid;
   }
-  GLIBC_PRIVATE {
-    # functions which have an additional interface since they are
-    # are cancelable.
-    __libc_tcdrain;
-  }
 }
--- libc/io/Versions.jj	2003-11-12 08:23:42.000000000 +0100
+++ libc/io/Versions	2004-05-01 16:19:24.102092721 +0200
@@ -97,10 +97,4 @@ libc {
     # n*
     nftw; nftw64;
   }
-  GLIBC_PRIVATE {
-    # functions which have an additional interface since they are
-    # cancelable.
-    __libc_open; __libc_close; __libc_read; __libc_write;
-    __libc_lseek; __libc_fcntl; __libc_open64; __libc_lseek64;
-  }
 }

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]