From f3b4c74b53903b32d1b852b381ae22b140b7b05b Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 26 Nov 2005 14:14:05 +0000 Subject: 100 JUMP relocs less (remaining 431) by hiding internally used ones --- libc/inet/resolv.c | 29 ++++++++++++++++------------- libc/inet/rpc/auth_none.c | 5 +++-- libc/inet/rpc/auth_unix.c | 12 +++++++----- libc/inet/rpc/clnt_raw.c | 2 ++ libc/inet/rpc/clnt_simple.c | 3 +-- libc/inet/rpc/clnt_tcp.c | 4 +++- libc/inet/rpc/clnt_udp.c | 7 ++++++- libc/inet/rpc/clnt_unix.c | 4 +++- libc/inet/rpc/create_xid.c | 3 +-- libc/inet/rpc/pmap_rmt.c | 4 +++- libc/inet/rpc/rcmd.c | 2 ++ libc/inet/rpc/rpc_dtablesize.c | 5 +++-- libc/inet/rpc/rpc_private.h | 10 +++++----- libc/inet/rpc/rpc_thread.c | 26 ++++++++++++++++---------- libc/inet/rpc/ruserpass.c | 2 ++ libc/inet/rpc/svc.c | 13 +++++++++++-- libc/inet/rpc/svc_auth.c | 5 +++-- libc/inet/rpc/svc_run.c | 4 ++++ libc/inet/socketcalls.c | 2 +- libc/misc/internals/tempname.c | 2 +- libc/misc/internals/tempname.h | 2 +- libc/misc/sysvipc/shm.c | 3 +++ libc/misc/time/time.c | 18 +++++++++--------- libc/misc/ttyent/getttyent.c | 2 ++ libc/pwd_grp/pwd_grp.c | 16 ++++++++-------- libc/pwd_grp/pwd_grp_internal.c | 7 ------- libc/stdio/__fsetlocking.c | 4 +++- libc/stdio/_uintmaxtostr.c | 3 ++- libc/stdio/getdelim.c | 5 +++-- libc/stdio/getline.c | 2 ++ libc/stdio/old_vfprintf.c | 2 ++ libc/stdio/vfprintf.c | 1 + libc/stdlib/atexit.c | 4 ++-- libc/stdlib/valloc.c | 2 ++ libc/sysdeps/linux/common/__socketcall.c | 2 +- libc/sysdeps/linux/common/cmsg_nxthdr.c | 5 +++-- libc/sysdeps/linux/common/create_module.c | 4 ++-- libc/sysdeps/linux/common/getpagesize.c | 5 +++-- libc/sysdeps/linux/common/getrlimit.c | 2 +- libc/unistd/getopt.c | 4 ++-- libc/unistd/sysconf.c | 5 ++--- libc/unistd/usershell.c | 2 ++ 42 files changed, 149 insertions(+), 95 deletions(-) (limited to 'libc') diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 042398339..9104c2456 100644 --- a/libc/inet/resolv.c +++ b/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 */ diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c index b2683a651..e7b7aba53 100644 --- a/libc/inet/rpc/auth_none.c +++ b/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 diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c index 3e14ba2a5..4adb165cf 100644 --- a/libc/inet/rpc/auth_unix.c +++ b/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 diff --git a/libc/inet/rpc/clnt_raw.c b/libc/inet/rpc/clnt_raw.c index a1062109f..e21f40252 100644 --- a/libc/inet/rpc/clnt_raw.c +++ b/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 #include "rpc_private.h" diff --git a/libc/inet/rpc/clnt_simple.c b/libc/inet/rpc/clnt_simple.c index b0af24a98..b9d315aef 100644 --- a/libc/inet/rpc/clnt_simple.c +++ b/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); diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index 804c45b84..6ccd1ca53 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/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 @@ -65,7 +67,7 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro"; # include #endif -extern u_long _create_xid (void); +extern u_long _create_xid (void) attribute_hidden; #define MCALL_MSG_SIZE 24 diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index 75d72ec13..bd25e4b33 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/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 @@ -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 diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index 81d8c4686..cbdd0eba8 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -46,6 +46,8 @@ * Now go hang yourself. */ +#define authnone_create __authnone_create + #define __FORCE_GLIBC #include @@ -62,7 +64,7 @@ # include #endif -extern u_long _create_xid (void); +extern u_long _create_xid (void) attribute_hidden; #define MCALL_MSG_SIZE 24 diff --git a/libc/inet/rpc/create_xid.c b/libc/inet/rpc/create_xid.c index cbb961e4d..8a6dacad3 100644 --- a/libc/inet/rpc/create_xid.c +++ b/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; diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c index 0bb9dd884..04f558fe2 100644 --- a/libc/inet/rpc/pmap_rmt.c +++ b/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 @@ -59,7 +61,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro"; #include #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}; diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c index af0e2e17a..f9f29285e 100644 --- a/libc/inet/rpc/rcmd.c +++ b/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 diff --git a/libc/inet/rpc/rpc_dtablesize.c b/libc/inet/rpc/rpc_dtablesize.c index 8e0fa35be..b520b1b48 100644 --- a/libc/inet/rpc/rpc_dtablesize.c +++ b/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) diff --git a/libc/inet/rpc/rpc_private.h b/libc/inet/rpc/rpc_private.h index 93662669c..69ee1cb53 100644 --- a/libc/inet/rpc/rpc_private.h +++ b/libc/inet/rpc/rpc_private.h @@ -2,7 +2,7 @@ #include /* 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); diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c index 8e3fca506..fb0e19cd9 100644 --- a/libc/inet/rpc/rpc_thread.c +++ b/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__ */ diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index 5db3e567c..77a22240e 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#define __fsetlocking __libc_fsetlocking + #define __FORCE_GLIBC #include #include diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c index 6e1d8dc3d..08678ba79 100644 --- a/libc/inet/rpc/svc.c +++ b/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 @@ -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; diff --git a/libc/inet/rpc/svc_auth.c b/libc/inet/rpc/svc_auth.c index ebfacce04..80c4f7955 100644 --- a/libc/inet/rpc/svc_auth.c +++ b/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) diff --git a/libc/inet/rpc/svc_run.c b/libc/inet/rpc/svc_run.c index 3ef9fbd24..218bfd969 100644 --- a/libc/inet/rpc/svc_run.c +++ b/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 diff --git a/libc/inet/socketcalls.c b/libc/inet/socketcalls.c index 35ab1d7a8..2215d2d99 100644 --- a/libc/inet/socketcalls.c +++ b/libc/inet/socketcalls.c @@ -5,7 +5,7 @@ #include #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 diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c index 75f41ed95..589d627ae 100644 --- a/libc/misc/internals/tempname.c +++ b/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; diff --git a/libc/misc/internals/tempname.h b/libc/misc/internals/tempname.h index 9ce964741..dfe9399ca 100644 --- a/libc/misc/internals/tempname.h +++ b/libc/misc/internals/tempname.h @@ -4,7 +4,7 @@ #define __need_size_t #include 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: */ diff --git a/libc/misc/sysvipc/shm.c b/libc/misc/sysvipc/shm.c index 29f3178d6..9c6f019bf 100644 --- a/libc/misc/sysvipc/shm.c +++ b/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 #include #include diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 21c4bb96b..0eda2a4d1 100644 --- a/libc/misc/time/time.c +++ b/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__ diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c index d7d77c1ba..7c734dc0b 100644 --- a/libc/misc/ttyent/getttyent.c +++ b/libc/misc/ttyent/getttyent.c @@ -27,6 +27,8 @@ * SUCH DAMAGE. */ +#define __fsetlocking __libc_fsetlocking + #define _GNU_SOURCE #include #include diff --git a/libc/pwd_grp/pwd_grp.c b/libc/pwd_grp/pwd_grp.c index 0225c6c7e..2682b83a1 100644 --- a/libc/pwd_grp/pwd_grp.c +++ b/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; diff --git a/libc/pwd_grp/pwd_grp_internal.c b/libc/pwd_grp/pwd_grp_internal.c index 33cf0a313..0552c680b 100644 --- a/libc/pwd_grp/pwd_grp_internal.c +++ b/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 diff --git a/libc/stdio/__fsetlocking.c b/libc/stdio/__fsetlocking.c index f49503207..77690e269 100644 --- a/libc/stdio/__fsetlocking.c +++ b/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) diff --git a/libc/stdio/_uintmaxtostr.c b/libc/stdio/_uintmaxtostr.c index 858a39118..da7ebc766 100644 --- a/libc/stdio/_uintmaxtostr.c +++ b/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) diff --git a/libc/stdio/getdelim.c b/libc/stdio/getdelim.c index cf3cf4c10..f21b16062 100644 --- a/libc/stdio/getdelim.c +++ b/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) diff --git a/libc/stdio/getline.c b/libc/stdio/getline.c index 0708aedaa..7424dc024 100644 --- a/libc/stdio/getline.c +++ b/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, diff --git a/libc/stdio/old_vfprintf.c b/libc/stdio/old_vfprintf.c index 8caa3d66d..36e4d89b9 100644 --- a/libc/stdio/old_vfprintf.c +++ b/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" diff --git a/libc/stdio/vfprintf.c b/libc/stdio/vfprintf.c index 73bbe63d3..5f13a8eed 100644 --- a/libc/stdio/vfprintf.c +++ b/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 diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c index e9710b038..a01fb29e2 100644 --- a/libc/stdlib/atexit.c +++ b/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; diff --git a/libc/stdlib/valloc.c b/libc/stdlib/valloc.c index b008ac399..c1d6d29a5 100644 --- a/libc/stdlib/valloc.c +++ b/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 #include #include diff --git a/libc/sysdeps/linux/common/__socketcall.c b/libc/sysdeps/linux/common/__socketcall.c index 8e9fbf7f3..48a083c3a 100644 --- a/libc/sysdeps/linux/common/__socketcall.c +++ b/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 diff --git a/libc/sysdeps/linux/common/cmsg_nxthdr.c b/libc/sysdeps/linux/common/cmsg_nxthdr.c index 20c490dcc..cc17c28f5 100644 --- a/libc/sysdeps/linux/common/cmsg_nxthdr.c +++ b/libc/sysdeps/linux/common/cmsg_nxthdr.c @@ -22,8 +22,8 @@ #include -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) diff --git a/libc/sysdeps/linux/common/create_module.c b/libc/sysdeps/linux/common/create_module.c index 0c8f50999..ee7b4daef 100644 --- a/libc/sysdeps/linux/common/create_module.c +++ b/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) { diff --git a/libc/sysdeps/linux/common/getpagesize.c b/libc/sysdeps/linux/common/getpagesize.c index 0844d5b79..8469cbb76 100644 --- a/libc/sysdeps/linux/common/getpagesize.c +++ b/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) diff --git a/libc/sysdeps/linux/common/getrlimit.c b/libc/sysdeps/linux/common/getrlimit.c index faeba92f4..c84330b03 100644 --- a/libc/sysdeps/linux/common/getrlimit.c +++ b/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) { diff --git a/libc/unistd/getopt.c b/libc/unistd/getopt.c index 0dc0e0509..ed5237dc5 100644 --- a/libc/unistd/getopt.c +++ b/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; diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c index 902697b45..4c51c0c2b 100644 --- a/libc/unistd/sysconf.c +++ b/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 #include @@ -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 diff --git a/libc/unistd/usershell.c b/libc/unistd/usershell.c index 96ceaca51..323ed6a55 100644 --- a/libc/unistd/usershell.c +++ b/libc/unistd/usershell.c @@ -30,6 +30,8 @@ * November 2002, Erik Andersen */ +#define __fsetlocking __libc_fsetlocking + #define _GNU_SOURCE #include #include -- cgit v1.2.3