瀏覽代碼

100 JUMP relocs less (remaining 431) by hiding internally used ones

Peter S. Mazinger 19 年之前
父節點
當前提交
f3b4c74b53
共有 42 個文件被更改,包括 149 次插入95 次删除
  1. 16 13
      libc/inet/resolv.c
  2. 3 2
      libc/inet/rpc/auth_none.c
  3. 7 5
      libc/inet/rpc/auth_unix.c
  4. 2 0
      libc/inet/rpc/clnt_raw.c
  5. 1 2
      libc/inet/rpc/clnt_simple.c
  6. 3 1
      libc/inet/rpc/clnt_tcp.c
  7. 6 1
      libc/inet/rpc/clnt_udp.c
  8. 3 1
      libc/inet/rpc/clnt_unix.c
  9. 1 2
      libc/inet/rpc/create_xid.c
  10. 3 1
      libc/inet/rpc/pmap_rmt.c
  11. 2 0
      libc/inet/rpc/rcmd.c
  12. 3 2
      libc/inet/rpc/rpc_dtablesize.c
  13. 5 5
      libc/inet/rpc/rpc_private.h
  14. 16 10
      libc/inet/rpc/rpc_thread.c
  15. 2 0
      libc/inet/rpc/ruserpass.c
  16. 11 2
      libc/inet/rpc/svc.c
  17. 3 2
      libc/inet/rpc/svc_auth.c
  18. 4 0
      libc/inet/rpc/svc_run.c
  19. 1 1
      libc/inet/socketcalls.c
  20. 1 1
      libc/misc/internals/tempname.c
  21. 1 1
      libc/misc/internals/tempname.h
  22. 3 0
      libc/misc/sysvipc/shm.c
  23. 9 9
      libc/misc/time/time.c
  24. 2 0
      libc/misc/ttyent/getttyent.c
  25. 8 8
      libc/pwd_grp/pwd_grp.c
  26. 0 7
      libc/pwd_grp/pwd_grp_internal.c
  27. 3 1
      libc/stdio/__fsetlocking.c
  28. 2 1
      libc/stdio/_uintmaxtostr.c
  29. 3 2
      libc/stdio/getdelim.c
  30. 2 0
      libc/stdio/getline.c
  31. 2 0
      libc/stdio/old_vfprintf.c
  32. 1 0
      libc/stdio/vfprintf.c
  33. 2 2
      libc/stdlib/atexit.c
  34. 2 0
      libc/stdlib/valloc.c
  35. 1 1
      libc/sysdeps/linux/common/__socketcall.c
  36. 3 2
      libc/sysdeps/linux/common/cmsg_nxthdr.c
  37. 2 2
      libc/sysdeps/linux/common/create_module.c
  38. 3 2
      libc/sysdeps/linux/common/getpagesize.c
  39. 1 1
      libc/sysdeps/linux/common/getrlimit.c
  40. 2 2
      libc/unistd/getopt.c
  41. 2 3
      libc/unistd/sysconf.c
  42. 2 0
      libc/unistd/usershell.c

+ 16 - 13
libc/inet/resolv.c

@@ -244,7 +244,7 @@ extern int __read_etc_hosts_r(FILE *fp, const char * name, int type,
 			    struct hostent * result_buf,
 			    char * buf, size_t buflen,
 			    struct hostent ** result,
-			    int * h_errnop);
+			    int * h_errnop) attribute_hidden;
 extern int __dns_lookup(const char * name, int type, int nscount,
 	char ** nsip, unsigned char ** outpacket, struct resolv_answer * a) attribute_hidden;
 
@@ -267,11 +267,11 @@ extern int __open_nameservers(void) attribute_hidden;
 extern void __close_nameservers(void) attribute_hidden;
 extern int __dn_expand(const u_char *, const u_char *, const u_char *,
 	char *, int);
-extern int __ns_name_uncompress(const u_char *, const u_char *,
-		const u_char *, char *, size_t);
-extern int __ns_name_ntop(const u_char *, char *, size_t);
-extern int __ns_name_unpack(const u_char *, const u_char *, const u_char *,
-               u_char *, size_t);
+extern int __libc_ns_name_uncompress(const u_char *, const u_char *,
+		const u_char *, char *, size_t) attribute_hidden;
+extern int __libc_ns_name_ntop(const u_char *, char *, size_t) attribute_hidden;
+extern int __libc_ns_name_unpack(const u_char *, const u_char *, const u_char *,
+               u_char *, size_t) attribute_hidden;
 
 
 #ifdef L_encodeh
@@ -1427,7 +1427,7 @@ void attribute_hidden __open_etc_hosts(FILE **fp)
 	return;
 }
 
-int __read_etc_hosts_r(FILE * fp, const char * name, int type,
+int attribute_hidden __read_etc_hosts_r(FILE * fp, const char * name, int type,
 		     enum etc_hosts_action action,
 		     struct hostent * result_buf,
 		     char * buf, size_t buflen,
@@ -2377,7 +2377,7 @@ int gethostbyaddr_r (const void *addr, socklen_t len, int type,
 int __dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
           char *dst, int dstsiz)
 {
-	int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
+	int n = __libc_ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
 
 	if (n > 0 && dst[0] == '.')
 		dst[0] = '\0';
@@ -2429,18 +2429,19 @@ static int special(int ch)
  * note:
  *      Root domain returns as "." not "".
  */
-int __ns_name_uncompress(const u_char *msg, const u_char *eom,
+int attribute_hidden __libc_ns_name_uncompress(const u_char *msg, const u_char *eom,
 		const u_char *src, char *dst, size_t dstsiz)
 {
 	u_char tmp[NS_MAXCDNAME];
 	int n;
 
-	if ((n = ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
+	if ((n = __libc_ns_name_unpack(msg, eom, src, tmp, sizeof tmp)) == -1)
 		return (-1);
-	if (ns_name_ntop(tmp, dst, dstsiz) == -1)
+	if (__libc_ns_name_ntop(tmp, dst, dstsiz) == -1)
 		return (-1);
 	return (n);
 }
+strong_alias(__libc_ns_name_uncompress,__ns_name_uncompress)
 
 
 /*
@@ -2452,7 +2453,7 @@ int __ns_name_uncompress(const u_char *msg, const u_char *eom,
  *      The root is returned as "."
  *      All other domains are returned in non absolute form
  */
-int __ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
+int attribute_hidden __libc_ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
 	const u_char *cp;
 	char *dn, *eom;
 	u_char c;
@@ -2521,6 +2522,7 @@ int __ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
 	*dn++ = '\0';
         return (dn - dst);
 }
+strong_alias(__libc_ns_name_ntop,__ns_name_ntop)
 
 /*
  * ns_name_unpack(msg, eom, src, dst, dstsiz)
@@ -2528,7 +2530,7 @@ int __ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
  * return:
  *      -1 if it fails, or consumed octets if it succeeds.
  */
-int __ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
+int attribute_hidden __libc_ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
                u_char *dst, size_t dstsiz)
 {
 	const u_char *srcp, *dstlim;
@@ -2595,4 +2597,5 @@ int __ns_name_unpack(const u_char *msg, const u_char *eom, const u_char *src,
 		len = srcp - src;
 	return (len);
 }
+strong_alias(__libc_ns_name_unpack,__ns_name_unpack)
 #endif /* L_ns_name */

+ 3 - 2
libc/inet/rpc/auth_none.c

@@ -69,8 +69,8 @@ struct authnone_private_s {
 static struct authnone_private_s *authnone_private;
 #endif
 
-AUTH *
-authnone_create (void)
+AUTH attribute_hidden *
+__authnone_create (void)
 {
   struct authnone_private_s *ap;
   XDR xdr_stream;
@@ -98,6 +98,7 @@ authnone_create (void)
     }
   return (&ap->no_client);
 }
+strong_alias(__authnone_create,authnone_create)
 
 /*ARGSUSED */
 static bool_t

+ 7 - 5
libc/inet/rpc/auth_unix.c

@@ -92,8 +92,8 @@ static bool_t marshal_new_auth (AUTH *) internal_function;
  * Create a unix style authenticator.
  * Returns an auth handle with the given stuff in it.
  */
-AUTH *
-authunix_create (char *machname, uid_t uid, gid_t gid, int len,
+AUTH attribute_hidden *
+__authunix_create (char *machname, uid_t uid, gid_t gid, int len,
 		 gid_t *aup_gids)
 {
   struct authunix_parms aup;
@@ -158,13 +158,14 @@ no_memory:
   marshal_new_auth (auth);
   return auth;
 }
+strong_alias(__authunix_create,authunix_create)
 
 /*
  * Returns an auth handle with parameters determined by doing lots of
  * syscalls.
  */
-AUTH *
-authunix_create_default (void)
+AUTH attribute_hidden *
+__authunix_create_default (void)
 {
   int len;
   char machname[MAX_MACHINE_NAME + 1];
@@ -184,8 +185,9 @@ authunix_create_default (void)
   /* This braindamaged Sun code forces us here to truncate the
      list of groups to NGRPS members since the code in
      authuxprot.c transforms a fixed array.  Grrr.  */
-  return authunix_create (machname, uid, gid, MIN (NGRPS, len), gids);
+  return __authunix_create (machname, uid, gid, MIN (NGRPS, len), gids);
 }
+strong_alias(__authunix_create_default,authunix_create_default)
 
 /*
  * authunix operations

+ 2 - 0
libc/inet/rpc/clnt_raw.c

@@ -42,6 +42,8 @@ static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";
  * any interference from the kernel.
  */
 
+#define authnone_create __authnone_create
+
 #define __FORCE_GLIBC
 #include <features.h>
 #include "rpc_private.h"

+ 1 - 2
libc/inet/rpc/clnt_simple.c

@@ -150,8 +150,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
 }
 
 #ifdef __UCLIBC_HAS_THREADS__
-void
-__rpc_thread_clnt_cleanup (void)
+void attribute_hidden __rpc_thread_clnt_cleanup (void)
 {
 	struct callrpc_private_s *rcp = RPC_THREAD_VARIABLE(callrpc_private_s);
 

+ 3 - 1
libc/inet/rpc/clnt_tcp.c

@@ -50,6 +50,8 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
  * Now go hang yourself.
  */
 
+#define authnone_create __authnone_create
+
 #define __FORCE_GLIBC
 #include <features.h>
 
@@ -65,7 +67,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
 # include <wchar.h>
 #endif
 
-extern u_long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 #define MCALL_MSG_SIZE 24
 

+ 6 - 1
libc/inet/rpc/clnt_udp.c

@@ -37,6 +37,11 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
+/* CMSG_NXTHDR is using it */
+#define __cmsg_nxthdr __libc_cmsg_nxthdr
+
+#define authnone_create __authnone_create
+
 #define __FORCE_GLIBC
 #include <features.h>
 
@@ -62,7 +67,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
 #endif
 
 extern bool_t xdr_opaque_auth (XDR *, struct opaque_auth *);
-extern u_long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 /*
  * UDP bases client side rpc operations

+ 3 - 1
libc/inet/rpc/clnt_unix.c

@@ -46,6 +46,8 @@
  * Now go hang yourself.
  */
 
+#define authnone_create __authnone_create
+
 #define __FORCE_GLIBC
 #include <features.h>
 
@@ -62,7 +64,7 @@
 # include <wchar.h>
 #endif
 
-extern u_long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 #define MCALL_MSG_SIZE 24
 

+ 1 - 2
libc/inet/rpc/create_xid.c

@@ -40,8 +40,7 @@ static pthread_mutex_t createxid_lock = PTHREAD_MUTEX_INITIALIZER;
 static int is_initialized;
 static struct drand48_data __rpc_lrand48_data;
 
-unsigned long
-_create_xid (void)
+u_long attribute_hidden _create_xid (void)
 {
   unsigned long res;
 

+ 3 - 1
libc/inet/rpc/pmap_rmt.c

@@ -39,6 +39,8 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
+#define authunix_create_default __authunix_create_default
+
 #define __FORCE_GLIBC
 #include <features.h>
 
@@ -59,7 +61,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
 #include <arpa/inet.h>
 #define MAX_BROADCAST_SIZE 1400
 
-extern u_long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 static const struct timeval timeout = {3, 0};
 

+ 2 - 0
libc/inet/rpc/rcmd.c

@@ -35,6 +35,8 @@
 static char sccsid[] = "@(#)rcmd.c	8.3 (Berkeley) 3/26/94";
 #endif /* LIBC_SCCS and not lint */
 
+#define bcopy __bcopy
+
 #define __FORCE_GLIBC
 #include <features.h>
 

+ 3 - 2
libc/inet/rpc/rpc_dtablesize.c

@@ -42,8 +42,8 @@ static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";
  * Cache the result of getdtablesize(), so we don't have to do an
  * expensive system call every time.
  */
-int
-_rpc_dtablesize (void)
+int attribute_hidden
+__libc__rpc_dtablesize (void)
 {
   static int size;
 
@@ -52,3 +52,4 @@ _rpc_dtablesize (void)
 
   return size;
 }
+strong_alias(__libc__rpc_dtablesize,_rpc_dtablesize)

+ 5 - 5
libc/inet/rpc/rpc_private.h

@@ -2,7 +2,7 @@
 #include <rpc/rpc.h>
 
 /* Now define the internal interfaces.  */
-extern unsigned long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 /*
  * Multi-threaded support
@@ -40,10 +40,10 @@ struct rpc_thread_variables {
 };
 
 extern struct rpc_thread_variables *__rpc_thread_variables(void)
-     __attribute__ ((const));
-extern void __rpc_thread_svc_cleanup (void);
-extern void __rpc_thread_clnt_cleanup (void);
-extern void __rpc_thread_key_cleanup (void);
+     __attribute__ ((const)) attribute_hidden;
+extern void __rpc_thread_svc_cleanup (void) attribute_hidden;
+extern void __rpc_thread_clnt_cleanup (void) attribute_hidden;
+/*extern void __rpc_thread_key_cleanup (void) attribute_hidden;*/
 
 extern void __rpc_thread_destroy (void);
 

+ 16 - 10
libc/inet/rpc/rpc_thread.c

@@ -63,7 +63,7 @@ rpc_thread_multi (void)
 }
 
 
-struct rpc_thread_variables *
+struct rpc_thread_variables attribute_hidden *
 __rpc_thread_variables (void)
 {
 	__libc_once_define (static, once);
@@ -94,8 +94,8 @@ __rpc_thread_variables (void)
 #undef svc_pollfd
 #undef svc_max_pollfd
 
-fd_set *
-__rpc_thread_svc_fdset (void)
+fd_set attribute_hidden *
+__libc_rpc_thread_svc_fdset (void)
 {
 	struct rpc_thread_variables *tvp;
 
@@ -104,6 +104,7 @@ __rpc_thread_svc_fdset (void)
 		return &svc_fdset;
 	return &tvp->svc_fdset_s;
 }
+strong_alias(__libc_rpc_thread_svc_fdset,__rpc_thread_svc_fdset)
 
 struct rpc_createerr *
 __rpc_thread_createerr (void)
@@ -116,8 +117,8 @@ __rpc_thread_createerr (void)
 	return &tvp->rpc_createerr_s;
 }
 
-struct pollfd **
-__rpc_thread_svc_pollfd (void)
+struct pollfd attribute_hidden **
+__libc_rpc_thread_svc_pollfd (void)
 {
 	struct rpc_thread_variables *tvp;
 
@@ -126,9 +127,10 @@ __rpc_thread_svc_pollfd (void)
 		return &svc_pollfd;
 	return &tvp->svc_pollfd_s;
 }
+strong_alias(__libc_rpc_thread_svc_pollfd,__rpc_thread_svc_pollfd)
 
-int *
-__rpc_thread_svc_max_pollfd (void)
+int attribute_hidden *
+__libc_rpc_thread_svc_max_pollfd (void)
 {
 	struct rpc_thread_variables *tvp;
 
@@ -137,6 +139,7 @@ __rpc_thread_svc_max_pollfd (void)
 		return &svc_max_pollfd;
 	return &tvp->svc_max_pollfd_s;
 }
+strong_alias(__libc_rpc_thread_svc_max_pollfd,__rpc_thread_svc_max_pollfd)
 #else
 
 #undef svc_fdset
@@ -144,11 +147,12 @@ __rpc_thread_svc_max_pollfd (void)
 #undef svc_pollfd
 #undef svc_max_pollfd
 
-fd_set * __rpc_thread_svc_fdset (void)
+fd_set attribute_hidden * __libc_rpc_thread_svc_fdset (void)
 {
     extern fd_set svc_fdset;
     return &(svc_fdset);
 }
+strong_alias(__libc_rpc_thread_svc_fdset,__rpc_thread_svc_fdset)
 
 struct rpc_createerr * __rpc_thread_createerr (void)
 {
@@ -156,17 +160,19 @@ struct rpc_createerr * __rpc_thread_createerr (void)
     return &(rpc_createerr);
 }
 
-struct pollfd ** __rpc_thread_svc_pollfd (void)
+struct pollfd attribute_hidden ** __libc_rpc_thread_svc_pollfd (void)
 {
     extern struct pollfd *svc_pollfd;
     return &(svc_pollfd);
 }
+strong_alias(__libc_rpc_thread_svc_pollfd,__rpc_thread_svc_pollfd)
 
-int * __rpc_thread_svc_max_pollfd (void)
+int attribute_hidden * __libc_rpc_thread_svc_max_pollfd (void)
 {
     extern int svc_max_pollfd;
     return &(svc_max_pollfd);
 }
+strong_alias(__libc_rpc_thread_svc_max_pollfd,__rpc_thread_svc_max_pollfd)
 
 #endif /* __UCLIBC_HAS_THREADS__ */
 

+ 2 - 0
libc/inet/rpc/ruserpass.c

@@ -27,6 +27,8 @@
  * SUCH DAMAGE.
  */
 
+#define __fsetlocking __libc_fsetlocking
+
 #define __FORCE_GLIBC
 #include <features.h>
 #include <sys/types.h>

+ 11 - 2
libc/inet/rpc/svc.c

@@ -36,6 +36,16 @@
  * Copyright (C) 1984, Sun Microsystems, Inc.
  */
 
+#define _authenticate __libc__authenticate
+#define _rpc_dtablesize __libc__rpc_dtablesize
+
+/* used by svc_[max_]pollfd */
+#define __rpc_thread_svc_pollfd __libc_rpc_thread_svc_pollfd
+#define __rpc_thread_svc_max_pollfd __libc_rpc_thread_svc_max_pollfd
+
+/* used by svc_fdset */
+#define __rpc_thread_svc_fdset __libc_rpc_thread_svc_fdset
+
 #define __FORCE_GLIBC
 #define _GNU_SOURCE
 #include <features.h>
@@ -480,8 +490,7 @@ svc_getreq_common (const int fd)
 
 #ifdef __UCLIBC_HAS_THREADS__
 
-void
-__rpc_thread_svc_cleanup (void)
+void attribute_hidden __rpc_thread_svc_cleanup (void)
 {
   struct svc_callout *svcp;
 

+ 3 - 2
libc/inet/rpc/svc_auth.c

@@ -101,8 +101,8 @@ svcauthsw[] =
  * There is an assumption that any flavour less than AUTH_NULL is
  * invalid.
  */
-enum auth_stat
-_authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
+enum auth_stat attribute_hidden
+__libc__authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
 {
   register int cred_flavor;
 
@@ -115,6 +115,7 @@ _authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
 
   return AUTH_REJECTEDCRED;
 }
+strong_alias(__libc__authenticate,_authenticate)
 
 static enum auth_stat
 _svcauth_null (struct svc_req *rqst, struct rpc_msg *msg)

+ 4 - 0
libc/inet/rpc/svc_run.c

@@ -31,6 +31,10 @@
  * Wait for input, call server program.
  */
 
+/* used by svc_[max_]pollfd */
+#define __rpc_thread_svc_pollfd __libc_rpc_thread_svc_pollfd
+#define __rpc_thread_svc_max_pollfd __libc_rpc_thread_svc_max_pollfd
+
 #define __FORCE_GLIBC
 #define _GNU_SOURCE
 #include <features.h>

+ 1 - 1
libc/inet/socketcalls.c

@@ -5,7 +5,7 @@
 #include <sys/socket.h>
 
 #ifdef __NR_socketcall
-extern int __socketcall(int call, unsigned long *args);
+extern int __socketcall(int call, unsigned long *args) attribute_hidden;
 
 /* Various socketcall numbers */
 #define SYS_SOCKET      1

+ 1 - 1
libc/misc/internals/tempname.c

@@ -59,7 +59,7 @@ static int direxists (const char *dir)
    for use with mk[s]temp.  Will fail (-1) if DIR is non-null and
    doesn't exist, none of the searched dirs exists, or there's not
    enough space in TMPL. */
-int __path_search (char *tmpl, size_t tmpl_len, const char *dir,
+int attribute_hidden __path_search (char *tmpl, size_t tmpl_len, const char *dir,
 	const char *pfx, int try_tmpdir)
 {
     //const char *d;

+ 1 - 1
libc/misc/internals/tempname.h

@@ -4,7 +4,7 @@
 #define	__need_size_t
 #include <stddef.h>
 extern int __path_search (char *tmpl, size_t tmpl_len, const char *dir, 
-	        const char *pfx, int try_tmpdir);
+	        const char *pfx, int try_tmpdir) attribute_hidden;
 extern int __gen_tempname (char *__tmpl, int __kind) attribute_hidden;
 
 /* The __kind argument to __gen_tempname may be one of: */

+ 3 - 0
libc/misc/sysvipc/shm.c

@@ -17,6 +17,9 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+/* SHMLBA is using it */
+#define __getpagesize __libc_getpagesize
+
 #include <stdlib.h>
 #include <errno.h>
 #include <sys/shm.h>

+ 9 - 9
libc/misc/time/time.c

@@ -210,16 +210,16 @@ extern pthread_mutex_t _time_tzlock;
 extern rule_struct _time_tzinfo[2];
 
 extern struct tm *_time_t2tm(const time_t *__restrict timer,
-							 int offset, struct tm *__restrict result);
+					int offset, struct tm *__restrict result) attribute_hidden;
 
-extern time_t _time_mktime(struct tm *timeptr, int store_on_success);
+extern time_t _time_mktime(struct tm *timeptr, int store_on_success) attribute_hidden;
 
 extern struct tm *__time_localtime_tzi(const time_t *__restrict timer,
-									   struct tm *__restrict result,
-									   rule_struct *tzi);
+					struct tm *__restrict result,
+					rule_struct *tzi) attribute_hidden;
 
 extern time_t _time_mktime_tzi(struct tm *timeptr, int store_on_success,
-							   rule_struct *tzi);
+					rule_struct *tzi) attribute_hidden;
 
 /**********************************************************************/
 #ifdef L_asctime
@@ -679,7 +679,7 @@ static int tm_isdst(register const struct tm *__restrict ptm,
 	return (isdst & 1);
 }
 
-struct tm *__time_localtime_tzi(register const time_t *__restrict timer,
+struct tm attribute_hidden *__time_localtime_tzi(register const time_t *__restrict timer,
 								register struct tm *__restrict result,
 								rule_struct *tzi)
 {
@@ -2023,7 +2023,7 @@ static const char utc_string[] = "UTC";
 
 /* Note: offset is the correction in _days_ to *timer! */
 
-struct tm *_time_t2tm(const time_t *__restrict timer,
+struct tm attribute_hidden *_time_t2tm(const time_t *__restrict timer,
 					  int offset, struct tm *__restrict result)
 {
 	register int *p;
@@ -2161,7 +2161,7 @@ struct tm __time_tm;	/* Global shared by gmtime() and localtime(). */
 /**********************************************************************/
 #ifdef L__time_mktime
 
-time_t _time_mktime(struct tm *timeptr, int store_on_success)
+time_t attribute_hidden _time_mktime(struct tm *timeptr, int store_on_success)
 {
 	time_t t;
 
@@ -2185,7 +2185,7 @@ static const unsigned char __vals[] = {
 	    29,
 };
 
-time_t _time_mktime_tzi(struct tm *timeptr, int store_on_success,
+time_t attribute_hidden _time_mktime_tzi(struct tm *timeptr, int store_on_success,
 						rule_struct *tzi)
 {
 #ifdef __BCC__

+ 2 - 0
libc/misc/ttyent/getttyent.c

@@ -27,6 +27,8 @@
  * SUCH DAMAGE.
  */
 
+#define __fsetlocking __libc_fsetlocking
+
 #define _GNU_SOURCE
 #include <features.h>
 #include <ttyent.h>

+ 8 - 8
libc/pwd_grp/pwd_grp.c

@@ -49,12 +49,12 @@
 /**********************************************************************/
 /* Prototypes for internal functions. */
 
-extern int __parsepwent(void *pw, char *line);
-extern int __parsegrent(void *gr, char *line);
-extern int __parsespent(void *sp, char *line);
+extern int __parsepwent(void *pw, char *line) attribute_hidden;
+extern int __parsegrent(void *gr, char *line) attribute_hidden;
+extern int __parsespent(void *sp, char *line) attribute_hidden;
 
 extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
-					   char *__restrict line_buff, size_t buflen, FILE *f);
+			   char *__restrict line_buff, size_t buflen, FILE *f) attribute_hidden;
 
 /**********************************************************************/
 /* For the various fget??ent_r funcs, return
@@ -833,7 +833,7 @@ static const unsigned char pw_off[] = {
 	offsetof(struct passwd, pw_shell) 	/* 6 */
 };
 
-int __parsepwent(void *data, char *line)
+int attribute_hidden __parsepwent(void *data, char *line)
 {
 	char *endptr;
 	char *p;
@@ -888,7 +888,7 @@ static const unsigned char gr_off[] = {
 	offsetof(struct group, gr_gid)		/* 2 - not a char ptr */
 };
 
-int __parsegrent(void *data, char *line)
+int attribute_hidden __parsegrent(void *data, char *line)
 {
 	char *endptr;
 	char *p;
@@ -992,7 +992,7 @@ static const unsigned char sp_off[] = {
 	offsetof(struct spwd, sp_flag) 		/* 8 - not a char ptr */
 };
 
-int __parsespent(void *data, char * line)
+int attribute_hidden __parsespent(void *data, char * line)
 {
 	char *endptr;
 	char *p;
@@ -1058,7 +1058,7 @@ int __parsespent(void *data, char * line)
  * Returns 0 on success and ENOENT for end-of-file (glibc concession).
  */
 
-int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
+int attribute_hidden __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
 				char *__restrict line_buff, size_t buflen, FILE *f)
 {
 	int line_len;

+ 0 - 7
libc/pwd_grp/pwd_grp_internal.c

@@ -49,13 +49,6 @@
 /**********************************************************************/
 /* Prototypes for internal functions. */
 
-extern int __parsepwent(void *pw, char *line);
-extern int __parsegrent(void *gr, char *line);
-extern int __parsespent(void *sp, char *line);
-
-extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data,
-					   char *__restrict line_buff, size_t buflen, FILE *f);
-
 #ifndef GETXXKEY_R_FUNC
 #error GETXXKEY_R_FUNC is not defined!
 #endif

+ 3 - 1
libc/stdio/__fsetlocking.c

@@ -15,7 +15,7 @@
  *   glibc treats invalid locking_mode args as FSETLOCKING_INTERNAL.
  */
 
-int __fsetlocking(FILE *stream, int locking_mode)
+int attribute_hidden __libc_fsetlocking(FILE *stream, int locking_mode)
 {
 #ifdef __UCLIBC_HAS_THREADS__
 	int current = 1 + (stream->__user_locking & 1);
@@ -43,3 +43,5 @@ int __fsetlocking(FILE *stream, int locking_mode)
 	return FSETLOCKING_INTERNAL;
 #endif
 }
+
+strong_alias(__libc_fsetlocking,__fsetlocking)

+ 2 - 1
libc/stdio/_uintmaxtostr.c

@@ -17,7 +17,7 @@
 #define INTERNAL_DIV_MOD
 #endif
 
-char *_uintmaxtostr(register char * __restrict bufend, uintmax_t uval,
+char attribute_hidden *__libc__uintmaxtostr(register char * __restrict bufend, uintmax_t uval,
 					int base, __UIM_CASE alphacase)
 {
     int negative;
@@ -149,3 +149,4 @@ char *_uintmaxtostr(register char * __restrict bufend, uintmax_t uval,
 
     return bufend;
 }
+strong_alias(__libc__uintmaxtostr,_uintmaxtostr)

+ 3 - 2
libc/stdio/getdelim.c

@@ -20,7 +20,7 @@
 
 #define GETDELIM_GROWBY		64
 
-ssize_t __getdelim(char **__restrict lineptr, size_t *__restrict n,
+ssize_t attribute_hidden __libc_getdelim(char **__restrict lineptr, size_t *__restrict n,
 				   int delimiter, register FILE *__restrict stream)
 {
 	register char *buf;
@@ -74,4 +74,5 @@ ssize_t __getdelim(char **__restrict lineptr, size_t *__restrict n,
 	return pos;
 }
 
-weak_alias(__getdelim,getdelim);
+strong_alias(__libc_getdelim,__getdelim)
+weak_alias(__getdelim,getdelim)

+ 2 - 0
libc/stdio/getline.c

@@ -5,6 +5,8 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
+#define __getdelim __libc_getdelim
+
 #include "_stdio.h"
 
 ssize_t getline(char **__restrict lineptr, size_t *__restrict n,

+ 2 - 0
libc/stdio/old_vfprintf.c

@@ -127,6 +127,8 @@
 
 /**************************************************************************/
 
+#define _uintmaxtostr __libc__uintmaxtostr
+
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
 #define _GNU_SOURCE				/* for strnlen */
 #include "_stdio.h"

+ 1 - 0
libc/stdio/vfprintf.c

@@ -88,6 +88,7 @@
  *   treats this as an error.
  */
 
+#define _uintmaxtostr __libc__uintmaxtostr
 
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
 #define _GNU_SOURCE

+ 2 - 2
libc/stdlib/atexit.c

@@ -95,7 +95,7 @@ extern struct exit_function *__exit_function_table;
 #else
 extern struct exit_function __exit_function_table[__UCLIBC_MAX_ATEXIT];
 #endif
-extern struct exit_function *__new_exitfn (void);
+extern struct exit_function *__new_exitfn (void) attribute_hidden;
 
 /* this is in the L___cxa_atexit object */
 extern int __cxa_atexit (cxaefuncp, void *arg, void *dso_handle);
@@ -237,7 +237,7 @@ struct exit_function __exit_function_table[__UCLIBC_MAX_ATEXIT];
  * Find and return a new exit_function pointer, for atexit,
  * onexit and __cxa_atexit to initialize
  */
-struct exit_function *__new_exitfn(void)
+struct exit_function attribute_hidden *__new_exitfn(void)
 {
     struct exit_function *efp;
 

+ 2 - 0
libc/stdlib/valloc.c

@@ -20,6 +20,8 @@ Cambridge, MA 02139, USA.
    The author may be reached (Email) at the address mike@@ai.mit.edu,
    or (US mail) as Mike Haertel c/o Free Software Foundation.  */
 
+#define getpagesize __libc_getpagesize
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <malloc.h>

+ 1 - 1
libc/sysdeps/linux/common/__socketcall.c

@@ -10,5 +10,5 @@
 #include "syscalls.h"
 #ifdef __NR_socketcall
 #define __NR___socketcall __NR_socketcall
-_syscall2(int, __socketcall, int, call, unsigned long *, args);
+attribute_hidden _syscall2(int, __socketcall, int, call, unsigned long *, args);
 #endif

+ 3 - 2
libc/sysdeps/linux/common/cmsg_nxthdr.c

@@ -22,8 +22,8 @@
 #include <sys/socket.h>
 
 
-struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
+struct cmsghdr attribute_hidden *
+__libc_cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
 {
   if ((size_t) cmsg->cmsg_len < sizeof (struct cmsghdr))
     /* The kernel header does this so there may be a reason.  */
@@ -39,3 +39,4 @@ __cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
     return NULL;
   return cmsg;
 }
+strong_alias(__libc_cmsg_nxthdr,__cmsg_nxthdr)

+ 2 - 2
libc/sysdeps/linux/common/create_module.c

@@ -34,7 +34,7 @@
 # ifdef __STR_NR_create_module
 #  define __STR_NR___create_module  __STR_NR_create_module
 # endif
-_syscall2(long, __create_module, const char *, name, size_t, size);
+attribute_hidden _syscall2(long, __create_module, const char *, name, size_t, size);
 /* By checking the value of errno, we know if we have been fooled 
  * by the syscall2 macro making a very high address look like a 
  * negative, so we we fix it up here.  */
@@ -53,7 +53,7 @@ unsigned long create_module(const char *name, size_t size)
 # define __NR___create_module  __NR_create_module
 /* Alpha doesn't have the same problem, exactly, but a bug in older
    kernels fails to clear the error flag.  Clear it here explicitly.  */
-_syscall4(unsigned long, __create_module, const char *, name,
+attribute_hidden _syscall4(unsigned long, __create_module, const char *, name,
 			size_t, size, size_t, dummy, size_t, err);
 unsigned long create_module(const char *name, size_t size)
 {

+ 3 - 2
libc/sysdeps/linux/common/getpagesize.c

@@ -22,7 +22,7 @@
 extern size_t __pagesize;
 
 /* Return the system page size.  */
-int __getpagesize(void)
+int attribute_hidden __libc_getpagesize(void)
 {
   if (__pagesize != 0)
     return __pagesize;
@@ -40,5 +40,6 @@ int __getpagesize(void)
 #endif	/* NBPG.  */
 #endif	/* EXEC_PAGESIZE.  */
 }
-weak_alias(__getpagesize, getpagesize);
+strong_alias(__libc_getpagesize, __getpagesize)
+weak_alias(__getpagesize, getpagesize)
 

+ 1 - 1
libc/sysdeps/linux/common/getrlimit.c

@@ -13,7 +13,7 @@
 
 #ifdef __NR_ugetrlimit
 #define __NR___ugetrlimit __NR_ugetrlimit
-_syscall2(int, __ugetrlimit, enum __rlimit_resource, resource,
+attribute_hidden _syscall2(int, __ugetrlimit, enum __rlimit_resource, resource,
 		  struct rlimit *, rlim);
 int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
 {

+ 2 - 2
libc/unistd/getopt.c

@@ -62,7 +62,7 @@
 #include "getopt.h"
 
 extern int _getopt_internal (int argc, char *const *argv, const char *optstring, 
-	const struct option *longopts, int *longind, int long_only);
+	const struct option *longopts, int *longind, int long_only) attribute_hidden;
 
 
 /* For communication from `getopt' to the caller.
@@ -311,7 +311,7 @@ static const char *_getopt_initialize (int argc, char *const * argv, const char
    If LONG_ONLY is nonzero, '-' as well as '--' can introduce
    long-named options.  */
 
-int _getopt_internal (int argc, char *const *argv, const char *optstring, 
+int attribute_hidden _getopt_internal (int argc, char *const *argv, const char *optstring, 
 	const struct option *longopts, int *longind, int long_only)
 {
     int print_errors = opterr;

+ 2 - 3
libc/unistd/sysconf.c

@@ -16,6 +16,8 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#define getpagesize __libc_getpagesize
+
 #define _XOPEN_SOURCE  500
 #include <features.h>
 #include <errno.h>
@@ -37,9 +39,6 @@
 #error __UCLIBC_CLK_TCK_CONST not defined!
 #endif
 
-extern int getpagesize (void);
-extern int getdtablesize (void);
-
 /***********************************************************************/
 /*
  * Manuel Novoa III        Jan 2001

+ 2 - 0
libc/unistd/usershell.c

@@ -30,6 +30,8 @@
  * November 2002, Erik Andersen <andersen@codepoet.org> 
  */
 
+#define __fsetlocking __libc_fsetlocking
+
 #define _GNU_SOURCE
 #include <sys/param.h>
 #include <sys/file.h>