aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-03 12:09:37 +0000
committerRoland McGrath <roland@gnu.org>2002-08-03 12:09:37 +0000
commitc5598d4721655c8654e3f419d12b671e2a92c0ce (patch)
tree910ecdb5f7dbcb309929a3169437b169912f3f81
parentbc13934719a97d9fcea4eea6e353dc78f8e9da00 (diff)
downloadglibc-c5598d4721655c8654e3f419d12b671e2a92c0ce.zip
glibc-c5598d4721655c8654e3f419d12b671e2a92c0ce.tar.gz
glibc-c5598d4721655c8654e3f419d12b671e2a92c0ce.tar.bz2
* include/libc-symbols.h (hidden_weak): Define it for [__ASSEMBLER__].
* sysdeps/unix/make-syscalls.sh: Generate libc_hidden_def or libc_hidden_weak for every system call symbol defined. * include/time.h: Use libc_hidden_proto for time, asctime, mktime, timelocal, localtime, strftime. * time/asctime.c: Add libc_hidden_def. * time/mktime.c: Likewise. * time/localtime.c: Likewise. * time/strftime.c: Likewise. * time/strptime.c: Likewise. * sysdeps/generic/time.c: Likewise. * sysdeps/unix/time.c: Likewise. * sysdeps/unix/sysv/i386/time.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/time.S: Likewise. * include/arpa/inet.h: Use libc_hidden_proto for inet_ntop, inet_pton. inet_makeaddr, inet_netof, inet_addr, __inet_addr. * resolv/inet_ntop.c: Likewise. * resolv/inet_pton.c: Likewise. * inet/inet_mkadr.c: Add libc_hidden_def. * inet/inet_netof.c: Likewise. * resolv/inet_addr.c: Likewise. * include/libc-symbols.h: Remove `defined HAVE_BROKEN_ALIAS_ATTRIBUTE' clauses from conditionals for now. Will have to be fixed later for older compilers.
-rw-r--r--ChangeLog29
-rw-r--r--include/arpa/inet.h7
-rw-r--r--include/libc-symbols.h12
-rw-r--r--include/time.h8
-rw-r--r--inet/inet_mkadr.c1
-rw-r--r--inet/inet_netof.c1
-rw-r--r--resolv/inet_addr.c15
-rw-r--r--resolv/inet_ntop.c3
-rw-r--r--resolv/inet_pton.c1
-rw-r--r--sysdeps/generic/time.c3
-rw-r--r--sysdeps/unix/make-syscalls.sh7
-rw-r--r--sysdeps/unix/sysv/i386/time.S3
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/time.S3
-rw-r--r--sysdeps/unix/time.c3
-rw-r--r--time/asctime.c2
-rw-r--r--time/localtime.c3
-rw-r--r--time/mktime.c5
-rw-r--r--time/strftime.c3
-rw-r--r--time/strptime.c3
19 files changed, 91 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 06afac1..406bff4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,34 @@
2002-08-03 Roland McGrath <roland@redhat.com>
+ * include/libc-symbols.h (hidden_weak): Define it for [__ASSEMBLER__].
+
+ * sysdeps/unix/make-syscalls.sh: Generate libc_hidden_def or
+ libc_hidden_weak for every system call symbol defined.
+
+ * include/time.h: Use libc_hidden_proto for time, asctime, mktime,
+ timelocal, localtime, strftime.
+ * time/asctime.c: Add libc_hidden_def.
+ * time/mktime.c: Likewise.
+ * time/localtime.c: Likewise.
+ * time/strftime.c: Likewise.
+ * time/strptime.c: Likewise.
+ * sysdeps/generic/time.c: Likewise.
+ * sysdeps/unix/time.c: Likewise.
+ * sysdeps/unix/sysv/i386/time.S: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/time.S: Likewise.
+
+ * include/arpa/inet.h: Use libc_hidden_proto for inet_ntop, inet_pton.
+ inet_makeaddr, inet_netof, inet_addr, __inet_addr.
+ * resolv/inet_ntop.c: Likewise.
+ * resolv/inet_pton.c: Likewise.
+ * inet/inet_mkadr.c: Add libc_hidden_def.
+ * inet/inet_netof.c: Likewise.
+ * resolv/inet_addr.c: Likewise.
+
+ * include/libc-symbols.h: Remove `defined HAVE_BROKEN_ALIAS_ATTRIBUTE'
+ clauses from conditionals for now. Will have to be fixed later
+ for older compilers.
+
* sysdeps/generic/mempcpy.c (__mempcpy): #undef it before defn.
2002-08-02 Ulrich Drepper <drepper@redhat.com>
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index 49a8e8c..c81f582 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -1,3 +1,10 @@
#include <inet/arpa/inet.h>
extern in_addr_t __inet_aton (__const char *__cp, struct in_addr *__inp);
+libc_hidden_proto (__inet_aton)
+
+libc_hidden_proto (inet_aton)
+libc_hidden_proto (inet_ntop)
+libc_hidden_proto (inet_pton)
+libc_hidden_proto (inet_makeaddr)
+libc_hidden_proto (inet_netof)
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 4734c50..84ee166 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -440,8 +440,7 @@
versioned_symbol (libc, __real_foo, foo, GLIBC_2_1);
libc_hidden_ver (__real_foo, foo) */
-#if defined SHARED && defined DO_VERSIONING \
- && defined HAVE_BROKEN_ALIAS_ATTRIBUTE
+#if defined SHARED && defined DO_VERSIONING
# ifndef __ASSEMBLER__
# ifdef HAVE_BROKEN_VISIBILITY_ATTRIBUTE
# define __hidden_proto_hiddenattr
@@ -514,6 +513,7 @@
to use __GI_* name and we need to add alias to the real name.
hidden_proto and hidden_weak don't make sense for assembly. */
# define hidden_def(name) strong_alias (name, __GI_##name)
+# define hidden_weak(name) weak_alias (name, __GI_##name)
# define hidden_ver(local, name) strong_alias (local, __GI_##name)
# endif
#else
@@ -525,7 +525,7 @@
# define hidden_ver(local, name)
#endif
-#if !defined NOT_IN_libc && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
+#if !defined NOT_IN_libc
# define libc_hidden_proto(name) hidden_proto (name)
# define libc_hidden_def(name) hidden_def (name)
# define libc_hidden_weak(name) hidden_weak (name)
@@ -537,8 +537,7 @@
# define libc_hidden_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_rtld \
- && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
+#if defined NOT_IN_libc && defined IS_IN_rtld
# define rtld_hidden_proto(name) hidden_proto (name)
# define rtld_hidden_def(name) hidden_def (name)
# define rtld_hidden_weak(name) hidden_weak (name)
@@ -550,8 +549,7 @@
# define rtld_hidden_ver(local, name)
#endif
-#if defined NOT_IN_libc && defined IS_IN_libm \
- && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE
+#if defined NOT_IN_libc && defined IS_IN_libm
# define libm_hidden_proto(name) hidden_proto (name)
# define libm_hidden_def(name) hidden_def (name)
# define libm_hidden_weak(name) hidden_weak (name)
diff --git a/include/time.h b/include/time.h
index ff331cd..b68df96 100644
--- a/include/time.h
+++ b/include/time.h
@@ -4,6 +4,14 @@
#else
# include <time/time.h>
+libc_hidden_proto (time)
+libc_hidden_proto (asctime)
+libc_hidden_proto (mktime)
+libc_hidden_proto (timelocal)
+libc_hidden_proto (localtime)
+libc_hidden_proto (strftime)
+libc_hidden_proto (strptime)
+
/* Now define the internal interfaces. */
struct tm;
diff --git a/inet/inet_mkadr.c b/inet/inet_mkadr.c
index f076cf5..10f7318 100644
--- a/inet/inet_mkadr.c
+++ b/inet/inet_mkadr.c
@@ -56,3 +56,4 @@ inet_makeaddr(net, host)
addr = htonl(addr);
return (*(struct in_addr *)&addr);
}
+libc_hidden_def (inet_makeaddr)
diff --git a/inet/inet_netof.c b/inet/inet_netof.c
index ab06a54..aa99e5c 100644
--- a/inet/inet_netof.c
+++ b/inet/inet_netof.c
@@ -52,3 +52,4 @@ inet_netof(in)
else
return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT);
}
+libc_hidden_def (inet_netof)
diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c
index 83f2ec6..b52e404 100644
--- a/resolv/inet_addr.c
+++ b/resolv/inet_addr.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 1983, 1990, 1993
* The Regents of the University of California. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -13,7 +13,7 @@
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -29,14 +29,14 @@
/*
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
- *
+ *
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@@ -98,7 +98,7 @@ inet_addr(const char *cp) {
return (INADDR_NONE);
}
-/*
+/*
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
@@ -106,7 +106,8 @@ inet_addr(const char *cp) {
* cannot distinguish between failure and a local broadcast address.
*/
in_addr_t
-__inet_aton(const char *cp, struct in_addr *addr) {
+__inet_aton(const char *cp, struct in_addr *addr)
+{
static const in_addr_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };
in_addr_t val;
#ifndef _LIBC
@@ -221,3 +222,5 @@ ret_0:
return (0);
}
weak_alias (__inet_aton, inet_aton)
+libc_hidden_def (__inet_aton)
+libc_hidden_weak (inet_aton)
diff --git a/resolv/inet_ntop.c b/resolv/inet_ntop.c
index f99a69b..e5553a1 100644
--- a/resolv/inet_ntop.c
+++ b/resolv/inet_ntop.c
@@ -73,6 +73,7 @@ inet_ntop(af, src, dst, size)
}
/* NOTREACHED */
}
+libc_hidden_def (inet_ntop)
/* const char *
* inet_ntop4(src, dst, size)
@@ -184,7 +185,7 @@ inet_ntop6(src, dst, size)
tp += SPRINTF((tp, "%x", words[i]));
}
/* Was it a trailing run of 0x00's? */
- if (best.base != -1 && (best.base + best.len) ==
+ if (best.base != -1 && (best.base + best.len) ==
(NS_IN6ADDRSZ / NS_INT16SZ))
*tp++ = ':';
*tp++ = '\0';
diff --git a/resolv/inet_pton.c b/resolv/inet_pton.c
index 264278b..1a84835 100644
--- a/resolv/inet_pton.c
+++ b/resolv/inet_pton.c
@@ -65,6 +65,7 @@ inet_pton(af, src, dst)
}
/* NOTREACHED */
}
+libc_hidden_def (inet_pton)
/* int
* inet_pton4(src, dst)
diff --git a/sysdeps/generic/time.c b/sysdeps/generic/time.c
index 1628588..ec66f11 100644
--- a/sysdeps/generic/time.c
+++ b/sysdeps/generic/time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991,96,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,6 +30,7 @@ time (timer)
*timer = (time_t) -1;
return (time_t) -1;
}
+libc_hidden_def (time)
stub_warning (time)
#include <stub-tag.h>
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index 10d6992..d8a3210 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -130,7 +130,8 @@ shared-only-routines += $file
(echo '#include <sysdep.h>'; \\
echo 'PSEUDO ($strong, $syscall, $nargs)'; \\
echo ' ret'; \\
- echo 'PSEUDO_END($strong)'; \\"
+ echo 'PSEUDO_END($strong)'; \\
+ echo 'libc_hidden_def ($strong)'; \\"
# Append any weak aliases or versions defined for this syscall function.
@@ -168,6 +169,7 @@ shared-only-routines += $file
;;
*)
echo " echo 'weak_alias ($strong, $name)'; \\"
+ echo " echo 'libc_hidden_weak ($name)'; \\"
;;
esac
done
@@ -275,9 +277,12 @@ shared-only-routines += $file
echo " echo '} \\'; \\"
+ echo " echo 'libc_hidden_def (BP_SYM ($strong)) \\'; \\"
+
# generate thunk aliases
for name in $nv_weak; do
echo " echo 'weak_alias (BP_SYM ($strong), BP_SYM ($name)) \\'; \\"
+ echo " echo 'libc_hidden_weak (BP_SYM ($name)) \\'; \\"
done
# wrap up
diff --git a/sysdeps/unix/sysv/i386/time.S b/sysdeps/unix/sysv/i386/time.S
index 369065f..1d5395a 100644
--- a/sysdeps/unix/sysv/i386/time.S
+++ b/sysdeps/unix/sysv/i386/time.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,96,97,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,4 @@ SYSCALL (time, 1)
L(null):
ret
PSEUDO_END (time)
+libc_hidden_def (time)
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.S b/sysdeps/unix/sysv/linux/x86_64/time.S
index ecd9393..78efee1 100644
--- a/sysdeps/unix/sysv/linux/x86_64/time.S
+++ b/sysdeps/unix/sysv/linux/x86_64/time.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2001,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,3 +40,4 @@ L(pseudo_end):
add $0x8, %rsp
ret
PSEUDO_END(time)
+libc_hidden_def (time)
diff --git a/sysdeps/unix/time.c b/sysdeps/unix/time.c
index 1444bd0..f31ee96 100644
--- a/sysdeps/unix/time.c
+++ b/sysdeps/unix/time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1997, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,97,2001,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,3 +39,4 @@ time (t)
*t = result;
return result;
}
+libc_hidden_def (time)
diff --git a/time/asctime.c b/time/asctime.c
index b678ecb..f20b311 100644
--- a/time/asctime.c
+++ b/time/asctime.c
@@ -36,7 +36,7 @@ asctime (const struct tm *tp)
{
return __asctime_r (tp, result);
}
-
+libc_hidden_def (asctime)
char *
__asctime_r (const struct tm *tp, char *buf)
diff --git a/time/localtime.c b/time/localtime.c
index 9af78a8..069b12f 100644
--- a/time/localtime.c
+++ b/time/localtime.c
@@ -1,5 +1,5 @@
/* Convert `time_t' to `struct tm' in local time zone.
- Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
+ Copyright (C) 1991,92,93,95,96,97,98,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,3 +42,4 @@ localtime (t)
{
return __tz_convert (t, 1, &_tmbuf);
}
+libc_hidden_def (localtime)
diff --git a/time/mktime.c b/time/mktime.c
index 1aec223..4fb818e 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -405,6 +405,11 @@ mktime (tp)
#ifdef weak_alias
weak_alias (mktime, timelocal)
#endif
+
+#ifdef _LIBC
+libc_hidden_def (mktime)
+libc_hidden_weak (timelocal)
+#endif
#if DEBUG
diff --git a/time/strftime.c b/time/strftime.c
index bae952a..5f156e5 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -1361,6 +1361,9 @@ my_strftime (s, maxsize, format, tp ut_argument)
*p = L_('\0');
return i;
}
+#ifdef _LIBC
+libc_hidden_def (strftime)
+#endif
#ifdef emacs
diff --git a/time/strptime.c b/time/strptime.c
index a3fd811..f127905 100644
--- a/time/strptime.c
+++ b/time/strptime.c
@@ -1037,3 +1037,6 @@ strptime (buf, format, tm)
#endif
return strptime_internal (buf, format, tm, &decided, -1);
}
+#ifdef _LIBC
+libc_hidden_def (strptime)
+#endif