Don't use INTDEF/INTUSE in unwind-dw2-fde.c (bug 14132).
authorJoseph Myers <joseph@codesourcery.com>
Tue, 28 Oct 2014 17:12:57 +0000 (17:12 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 28 Oct 2014 17:12:57 +0000 (17:12 +0000)
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.

ChangeLog
sysdeps/generic/unwind-dw2-fde.c

index b92114a..5c7bef3 100644 (file)
--- 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
index ba003a9..5be0816 100644 (file)
@@ -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));
 }
 
 \f