about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-10-28 17:12:57 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-10-28 17:12:57 +0000
commit51e623f2419c9f33423fa8e36ed9a9ff0d05e17e (patch)
treebfb22bbf45f4ba51a2cd5f5f1b3174599ba9ec99
parent03d41216fe09fc71a2750946af8fe2892bf4feb5 (diff)
downloadglibc-51e623f2419c9f33423fa8e36ed9a9ff0d05e17e.tar.gz
glibc-51e623f2419c9f33423fa8e36ed9a9ff0d05e17e.tar.xz
glibc-51e623f2419c9f33423fa8e36ed9a9ff0d05e17e.zip
Don't use INTDEF/INTUSE in unwind-dw2-fde.c (bug 14132).
Continuing the removal of the obsolete INTDEF / INTUSE mechanism, this
patch replaces its use in unwind-dw2-fde.c with hidden_def and
hidden_proto.

Tested for x86.  This patch does result in code generation differences
(for some reason GCC decides to partition __register_frame_info_bases
after the patch).

	[BZ #14132]
	* sysdeps/generic/unwind-dw2-fde.c
	(__register_frame_info_bases_internal): Do not declare.
	(__register_frame_info_table_bases_internal): Likewise.
	(__deregister_frame_info_bases_internal): Likewise.
	(__register_frame_info_bases): Declare and use hidden_proto before
	definition.  Use hidden_def instead of INTDEF.
	(__register_frame_info_table_bases): Likewise.
	(__deregister_frame_info_bases): Likewise.
	(__register_frame_info): Do not use INTUSE.
	(__register_frame): Likewise.
	(__register_frame_info_table): Likewise.
	(__register_frame_table): Likewise.
	(__deregister_frame_info): Likewise.
	(__deregister_frame): Likewise.
-rw-r--r--ChangeLog18
-rw-r--r--sysdeps/generic/unwind-dw2-fde.c33
2 files changed, 36 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index b92114a7f1..5c7bef3907 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2014-10-28  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #14132]
+	* sysdeps/generic/unwind-dw2-fde.c
+	(__register_frame_info_bases_internal): Do not declare.
+	(__register_frame_info_table_bases_internal): Likewise.
+	(__deregister_frame_info_bases_internal): Likewise.
+	(__register_frame_info_bases): Declare and use hidden_proto before
+	definition.  Use hidden_def instead of INTDEF.
+	(__register_frame_info_table_bases): Likewise.
+	(__deregister_frame_info_bases): Likewise.
+	(__register_frame_info): Do not use INTUSE.
+	(__register_frame): Likewise.
+	(__register_frame_info_table): Likewise.
+	(__register_frame_table): Likewise.
+	(__deregister_frame_info): Likewise.
+	(__deregister_frame): Likewise.
+
 2014-10-27  Gratian Crisan  <gratian.crisan@ni.com>
 
 	* sysdeps/unix/sysv/linux/arm/kernel-features.h
diff --git a/sysdeps/generic/unwind-dw2-fde.c b/sysdeps/generic/unwind-dw2-fde.c
index ba003a9f15..5be081656d 100644
--- a/sysdeps/generic/unwind-dw2-fde.c
+++ b/sysdeps/generic/unwind-dw2-fde.c
@@ -60,12 +60,15 @@ __libc_lock_define_initialized (static, object_mutex)
 #define __gthread_mutex_lock(m) __libc_lock_lock (*(m))
 #define __gthread_mutex_unlock(m) __libc_lock_unlock (*(m))
 
-void __register_frame_info_bases_internal (void *begin, struct object *ob,
-					   void *tbase, void *dbase);
-void __register_frame_info_table_bases_internal (void *begin,
-						 struct object *ob,
-						 void *tbase, void *dbase);
-void *__deregister_frame_info_bases_internal (void *begin);
+void __register_frame_info_bases (void *begin, struct object *ob,
+				  void *tbase, void *dbase);
+hidden_proto (__register_frame_info_bases)
+void __register_frame_info_table_bases (void *begin,
+					struct object *ob,
+					void *tbase, void *dbase);
+hidden_proto (__register_frame_info_table_bases)
+void *__deregister_frame_info_bases (void *begin);
+hidden_proto (__deregister_frame_info_bases)
 
 #else
 
@@ -122,12 +125,12 @@ __register_frame_info_bases (void *begin, struct object *ob,
 
   __gthread_mutex_unlock (&object_mutex);
 }
-INTDEF(__register_frame_info_bases)
+hidden_def (__register_frame_info_bases)
 
 void
 __register_frame_info (void *begin, struct object *ob)
 {
-  INTUSE(__register_frame_info_bases) (begin, ob, 0, 0);
+  __register_frame_info_bases (begin, ob, 0, 0);
 }
 
 void
@@ -140,7 +143,7 @@ __register_frame (void *begin)
     return;
 
   ob = (struct object *) malloc (sizeof (struct object));
-  INTUSE(__register_frame_info_bases) (begin, ob, 0, 0);
+  __register_frame_info_bases (begin, ob, 0, 0);
 }
 
 /* Similar, but BEGIN is actually a pointer to a table of unwind entries
@@ -167,19 +170,19 @@ __register_frame_info_table_bases (void *begin, struct object *ob,
 
   __gthread_mutex_unlock (&object_mutex);
 }
-INTDEF(__register_frame_info_table_bases)
+hidden_def (__register_frame_info_table_bases)
 
 void
 __register_frame_info_table (void *begin, struct object *ob)
 {
-  INTUSE(__register_frame_info_table_bases) (begin, ob, 0, 0);
+  __register_frame_info_table_bases (begin, ob, 0, 0);
 }
 
 void
 __register_frame_table (void *begin)
 {
   struct object *ob = (struct object *) malloc (sizeof (struct object));
-  INTUSE(__register_frame_info_table_bases) (begin, ob, 0, 0);
+  __register_frame_info_table_bases (begin, ob, 0, 0);
 }
 
 /* Called from crtbegin.o to deregister the unwind info for an object.  */
@@ -243,12 +246,12 @@ __deregister_frame_info_bases (void *begin)
   __gthread_mutex_unlock (&object_mutex);
   return (void *) ob;
 }
-INTDEF(__deregister_frame_info_bases)
+hidden_def (__deregister_frame_info_bases)
 
 void *
 __deregister_frame_info (void *begin)
 {
-  return INTUSE(__deregister_frame_info_bases) (begin);
+  return __deregister_frame_info_bases (begin);
 }
 
 void
@@ -256,7 +259,7 @@ __deregister_frame (void *begin)
 {
   /* If .eh_frame is empty, we haven't registered.  */
   if (*(uword *) begin != 0)
-    free (INTUSE(__deregister_frame_info_bases) (begin));
+    free (__deregister_frame_info_bases (begin));
 }