about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-03-15 09:30:44 +0000
committerUlrich Drepper <drepper@redhat.com>2002-03-15 09:30:44 +0000
commitdff07c4bd402944ea0abb544232541fd9a4c5429 (patch)
tree6444a596a9ec1519f238a00175c2a4ee9d880b8c
parent9360906d42dd15e24f27a35b77f16df516f3c05d (diff)
downloadglibc-dff07c4bd402944ea0abb544232541fd9a4c5429.tar.gz
glibc-dff07c4bd402944ea0abb544232541fd9a4c5429.tar.xz
glibc-dff07c4bd402944ea0abb544232541fd9a4c5429.zip
Update.
2002-03-15  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/i386-mcount.S: Just call __mcount_internal, it is an
	internal function.  Adjust for internal_function calling convention.
	* sysdeps/i386/machine-gmon.h: Declare and define __mcount_internal
	as internal_function.

	* sysdeps/generic/framestate.c: Declare fallback_frame_state_for as
	hidden.

	* nss/XXX-lookup.c (DB_LOOKUP_FCT): Add internal_function to
	declaration and definition.
	* nss/getXXbyYY_r.c (DB_LOOKUP_FCT): Add internal_function to
	declaration.
	* nss/getXXent_r.c: Likewise.
	* nss/nsswitch.h (db_lookup_function): Add internal_function to
	definition.

	* include/time.h: Declare __localtime_r as hidden.

	* include/grp.h: Declare __getgrent_r as hidden.
	* include/netdb.h: Declare __gethostent_r, __getnetent_r,
	__getservent_r, and __getprotoent_r as hidden.
	* include/pwd.h: Declare __getpwent_r as hidden.
	* include/shadow.h: Declare __getspent_r as hidden.
	* include/rpc/netdb.h: Declare __getrpcent_r as hidden.

	* iconv/gconv_int.h: Declare __gconv_read_conf, __gconv_alias_compare,
	and __gconv_transliterate as hidden.
	Add internal_function to __gconv_get_path declaration.
	* iconv/gconv_int.h: Add internal_function to __gconv_get_path
	definition.  Add attribute_hidden to __gconv_read_conf definition.
-rw-r--r--ChangeLog33
-rw-r--r--iconv/gconv_conf.c4
-rw-r--r--iconv/gconv_int.h9
-rw-r--r--include/grp.h3
-rw-r--r--include/netdb.h10
-rw-r--r--include/pwd.h3
-rw-r--r--include/rpc/netdb.h3
-rw-r--r--include/shadow.h3
-rw-r--r--include/time.h2
-rw-r--r--nss/XXX-lookup.c3
-rw-r--r--nss/getXXbyYY_r.c3
-rw-r--r--nss/getXXent_r.c3
-rw-r--r--nss/nsswitch.h5
-rw-r--r--sysdeps/generic/framestate.c6
-rw-r--r--sysdeps/i386/i386-mcount.S20
-rw-r--r--sysdeps/i386/machine-gmon.h6
16 files changed, 79 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f54987dc9..12a5011125 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2002-03-15  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/i386/i386-mcount.S: Just call __mcount_internal, it is an
+	internal function.  Adjust for internal_function calling convention.
+	* sysdeps/i386/machine-gmon.h: Declare and define __mcount_internal
+	as internal_function.
+
+	* sysdeps/generic/framestate.c: Declare fallback_frame_state_for as
+	hidden.
+
+	* nss/XXX-lookup.c (DB_LOOKUP_FCT): Add internal_function to
+	declaration and definition.
+	* nss/getXXbyYY_r.c (DB_LOOKUP_FCT): Add internal_function to
+	declaration.
+	* nss/getXXent_r.c: Likewise.
+	* nss/nsswitch.h (db_lookup_function): Add internal_function to
+	definition.
+
+	* include/time.h: Declare __localtime_r as hidden.
+
+	* include/grp.h: Declare __getgrent_r as hidden.
+	* include/netdb.h: Declare __gethostent_r, __getnetent_r,
+	__getservent_r, and __getprotoent_r as hidden.
+	* include/pwd.h: Declare __getpwent_r as hidden.
+	* include/shadow.h: Declare __getspent_r as hidden.
+	* include/rpc/netdb.h: Declare __getrpcent_r as hidden.
+
+	* iconv/gconv_int.h: Declare __gconv_read_conf, __gconv_alias_compare,
+	and __gconv_transliterate as hidden.
+	Add internal_function to __gconv_get_path declaration.
+	* iconv/gconv_int.h: Add internal_function to __gconv_get_path
+	definition.  Add attribute_hidden to __gconv_read_conf definition.
+
 2002-03-14  Ulrich Drepper  <drepper@redhat.com>
 
 	* elf/rtld.c: Declare _environ as hidden.
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
index 99519d09d2..8c2f4b014e 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -1,5 +1,5 @@
 /* Handle configuration data.
-   Copyright (C) 1997,98,99,2000,2001 Free Software Foundation, Inc.
+   Copyright (C) 1997,98,99,2000,2001,2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -416,6 +416,7 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
 
 /* Determine the directories we are looking for data in.  */
 void
+internal_function
 __gconv_get_path (void)
 {
   struct path_elem *result;
@@ -527,6 +528,7 @@ __gconv_get_path (void)
 /* Read all configuration files found in the user-specified and the default
    path.  */
 void
+attribute_hidden
 __gconv_read_conf (void)
 {
   void *modules = NULL;
diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h
index ae6be36b5e..df7d2ee65f 100644
--- a/iconv/gconv_int.h
+++ b/iconv/gconv_int.h
@@ -199,16 +199,17 @@ extern void __gconv_release_step (struct __gconv_step *step)
      internal_function;
 
 /* Read all the configuration data and cache it.  */
-extern void __gconv_read_conf (void);
+extern void __gconv_read_conf (void) attribute_hidden;
 
 /* Try to read module cache file.  */
 extern int __gconv_load_cache (void) internal_function;
 
 /* Determine the directories we are looking in.  */
-extern void __gconv_get_path (void);
+extern void __gconv_get_path (void) internal_function;
 
 /* Comparison function to search alias.  */
-extern int __gconv_alias_compare (const void *p1, const void *p2);
+extern int __gconv_alias_compare (const void *p1, const void *p2)
+     attribute_hidden;
 
 /* Clear reference to transformation step implementations which might
    cause the code to be unloaded.  */
@@ -248,7 +249,7 @@ extern int __gconv_transliterate (struct __gconv_step *step,
 				  __const unsigned char **inbufp,
 				  __const unsigned char *inbufend,
 				  unsigned char **outbufstart,
-				  size_t *irreversible);
+				  size_t *irreversible) attribute_hidden;
 
 
 /* Builtin transformations.  */
diff --git a/include/grp.h b/include/grp.h
index 6b13ea1b3d..984483bc5e 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -3,7 +3,8 @@
 
 /* Now define the internal interfaces.  */
 extern int __getgrent_r (struct group *__resultbuf, char *buffer,
-			 size_t __buflen, struct group **__result);
+			 size_t __buflen, struct group **__result)
+     attribute_hidden;
 extern int __old_getgrent_r (struct group *__resultbuf, char *buffer,
 			     size_t __buflen, struct group **__result);
 extern int __fgetgrent_r (FILE * __stream, struct group *__resultbuf,
diff --git a/include/netdb.h b/include/netdb.h
index 929ab9e6a0..0a97c01a3e 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -5,7 +5,7 @@
 extern int __gethostent_r (struct hostent *__restrict __result_buf,
 			   char *__restrict __buf, size_t __buflen,
 			   struct hostent **__restrict __result,
-			   int *__restrict __h_errnop);
+			   int *__restrict __h_errnop) attribute_hidden;
 extern int __old_gethostent_r (struct hostent *__restrict __result_buf,
 			       char *__restrict __buf, size_t __buflen,
 			       struct hostent **__restrict __result,
@@ -49,7 +49,7 @@ extern int __old_gethostbyname2_r (__const char *__restrict __name, int __af,
 extern int __getnetent_r (struct netent *__restrict __result_buf,
 			  char *__restrict __buf, size_t __buflen,
 			  struct netent **__restrict __result,
-			  int *__restrict __h_errnop);
+			  int *__restrict __h_errnop) attribute_hidden;
 extern int __old_getnetent_r (struct netent *__restrict __result_buf,
 			      char *__restrict __buf, size_t __buflen,
 			      struct netent **__restrict __result,
@@ -79,7 +79,8 @@ extern int __old_getnetbyname_r (__const char *__restrict __name,
 
 extern int __getservent_r (struct servent *__restrict __result_buf,
 			   char *__restrict __buf, size_t __buflen,
-			   struct servent **__restrict __result);
+			   struct servent **__restrict __result)
+     attribute_hidden;
 extern int __old_getservent_r (struct servent *__restrict __result_buf,
 			       char *__restrict __buf, size_t __buflen,
 			       struct servent **__restrict __result);
@@ -108,7 +109,8 @@ extern int __old_getservbyport_r (int __port,
 
 extern int __getprotoent_r (struct protoent *__restrict __result_buf,
 			    char *__restrict __buf, size_t __buflen,
-			    struct protoent **__restrict __result);
+			    struct protoent **__restrict __result)
+     attribute_hidden;
 extern int __old_getprotoent_r (struct protoent *__restrict __result_buf,
 				char *__restrict __buf, size_t __buflen,
 				struct protoent **__restrict __result);
diff --git a/include/pwd.h b/include/pwd.h
index 341c6cee16..374f02a7e3 100644
--- a/include/pwd.h
+++ b/include/pwd.h
@@ -3,7 +3,8 @@
 
 /* Now define the internal interfaces.  */
 extern int __getpwent_r (struct passwd *__resultbuf, char *__buffer,
-			 size_t __buflen, struct passwd **__result);
+			 size_t __buflen, struct passwd **__result)
+     attribute_hidden;
 extern int __old_getpwent_r (struct passwd *__resultbuf, char *__buffer,
 			     size_t __buflen, struct passwd **__result);
 extern int __getpwuid_r (__uid_t __uid, struct passwd *__resultbuf,
diff --git a/include/rpc/netdb.h b/include/rpc/netdb.h
index 310cdd7105..71c4a09411 100644
--- a/include/rpc/netdb.h
+++ b/include/rpc/netdb.h
@@ -17,7 +17,8 @@ extern int __old_getrpcbynumber_r (int __number, struct rpcent *__result_buf,
 				   struct rpcent **__result);
 
 extern int __getrpcent_r (struct rpcent *__result_buf, char *__buffer,
-			  size_t __buflen, struct rpcent **__result);
+			  size_t __buflen, struct rpcent **__result)
+     attribute_hidden;
 extern int __old_getrpcent_r (struct rpcent *__result_buf, char *__buffer,
 			      size_t __buflen, struct rpcent **__result);
 
diff --git a/include/shadow.h b/include/shadow.h
index 0ae6b2111a..3891d79865 100644
--- a/include/shadow.h
+++ b/include/shadow.h
@@ -3,7 +3,8 @@
 
 /* Now define the internal interfaces.  */
 extern int __getspent_r (struct spwd *__result_buf, char *__buffer,
-			 size_t __buflen, struct spwd **__result);
+			 size_t __buflen, struct spwd **__result)
+     attribute_hidden;
 extern int __old_getspent_r (struct spwd *__result_buf, char *__buffer,
 			     size_t __buflen, struct spwd **__result);
 extern int __getspnam_r (__const char *__name, struct spwd *__result_buf,
diff --git a/include/time.h b/include/time.h
index 0806e10a3a..ff331cddcd 100644
--- a/include/time.h
+++ b/include/time.h
@@ -38,7 +38,7 @@ extern time_t __mktime_internal (struct tm *__tp,
 						       struct tm *),
 				 time_t *__offset);
 extern struct tm *__localtime_r (__const time_t *__timer,
-				 struct tm *__tp);
+				 struct tm *__tp) attribute_hidden;
 
 extern struct tm *__gmtime_r (__const time_t *__restrict __timer,
 			      struct tm *__restrict __tp);
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
index 79985e674d..847c31459a 100644
--- a/nss/XXX-lookup.c
+++ b/nss/XXX-lookup.c
@@ -56,9 +56,10 @@
 service_user *DATABASE_NAME_SYMBOL attribute_hidden;
 
 extern int DB_LOOKUP_FCT (service_user **ni, const char *fct_name,
-			  void **fctp);
+			  void **fctp) internal_function;
 
 int
+internal_function
 DB_LOOKUP_FCT (service_user **ni, const char *fct_name, void **fctp)
 {
   if (DATABASE_NAME_SYMBOL == NULL
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index d7ab257757..ecd28ad2c2 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -112,7 +112,8 @@ typedef enum nss_status (*lookup_function) (ADD_PARAMS, LOOKUP_TYPE *, char *,
 					    size_t, int * H_ERRNO_PARM);
 
 /* The lookup function for the first entry of this service.  */
-extern int DB_LOOKUP_FCT (service_user **nip, const char *name, void **fctp);
+extern int DB_LOOKUP_FCT (service_user **nip, const char *name, void **fctp)
+     internal_function;
 
 /* Interval in which we transfer retry to contact the NSCD.  */
 #define NSS_NSCD_RETRY	100
diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c
index 9df443e90e..e1a2236009 100644
--- a/nss/getXXent_r.c
+++ b/nss/getXXent_r.c
@@ -111,7 +111,8 @@ static STAYOPEN_TMP;
 __libc_lock_define_initialized (static, lock)
 
 /* The lookup function for the first entry of this service.  */
-extern int DB_LOOKUP_FCT (service_user **nip, const char *name, void **fctp);
+extern int DB_LOOKUP_FCT (service_user **nip, const char *name, void **fctp)
+     internal_function;
 
 void
 SETFUNC_NAME (STAYOPEN)
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
index 5d6be7485c..16dd938502 100644
--- a/nss/nsswitch.h
+++ b/nss/nsswitch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2001,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
@@ -131,7 +131,8 @@ int __nss_next (service_user **ni, const char *fct_name, void **fctp,
 void *__nss_lookup_function (service_user *ni, const char *fct_name);
 
 
-typedef int (*db_lookup_function) (service_user **, const char *, void **);
+typedef int (*db_lookup_function) (service_user **, const char *, void **)
+     internal_function;
 typedef enum nss_status (*setent_function) (int);
 typedef enum nss_status (*endent_function) (void);
 typedef enum nss_status (*getent_function) (void *, char *, size_t,
diff --git a/sysdeps/generic/framestate.c b/sysdeps/generic/framestate.c
index 5cb3e6ca85..31f86034ee 100644
--- a/sysdeps/generic/framestate.c
+++ b/sysdeps/generic/framestate.c
@@ -24,6 +24,12 @@
 #include <unwind-dw2.c>
 #undef __frame_state_for
 
+struct frame_state * fallback_frame_state_for (void *, struct frame_state *)
+#ifdef _LIBC
+     attribute_hidden
+#endif
+     ;
+
 typedef struct frame_state * (*framesf)(void *pc, struct frame_state *);
 struct frame_state *__frame_state_for (void *pc,
 				       struct frame_state *frame_state);
diff --git a/sysdeps/i386/i386-mcount.S b/sysdeps/i386/i386-mcount.S
index 3d71198003..727d7a0ab8 100644
--- a/sysdeps/i386/i386-mcount.S
+++ b/sysdeps/i386/i386-mcount.S
@@ -1,5 +1,5 @@
 /* i386-specific implemetation of profiling support.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -36,22 +36,12 @@ C_LABEL(_mcount)
 	pushl %ecx
 	pushl %edx
 
-	movl 12(%esp), %eax
-	movl 4(%ebp), %ecx
-	pushl %eax
-	pushl %ecx
+	movl 12(%esp), %edx
+	movl 4(%ebp), %eax
 
-#ifdef PIC
-	call 1f
-1:	popl %ecx
-	addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ecx
-	movl C_SYMBOL_NAME(__mcount_internal@GOT)(%ecx), %eax
-	call *%eax
-#else
+	/* No need to access the PLT or GOT, __mcount_internal is an
+	   internal function and we can make a relative call.  */
 	call C_SYMBOL_NAME(__mcount_internal)
-#endif
-	popl %ecx
-	popl %eax	/* Pop the parameters.  */
 
 	/* Pop the saved registers.  Please note that `mcount' has no
 	   return value.  */
diff --git a/sysdeps/i386/machine-gmon.h b/sysdeps/i386/machine-gmon.h
index 33ec76388c..21aba79f36 100644
--- a/sysdeps/i386/machine-gmon.h
+++ b/sysdeps/i386/machine-gmon.h
@@ -1,5 +1,5 @@
 /* i386-specific implementation of profiling support.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -30,10 +30,10 @@
 /* We must not pollute the global namespace.  */
 #define mcount_internal __mcount_internal
 
-void mcount_internal (u_long frompc, u_long selfpc);
+extern void mcount_internal (u_long frompc, u_long selfpc) internal_function;
 
 #define _MCOUNT_DECL(frompc, selfpc) \
-void mcount_internal (u_long frompc, u_long selfpc)
+void internal_function mcount_internal (u_long frompc, u_long selfpc)
 
 
 /* Define MCOUNT as empty since we have the implementation in another