Fix -Wundef warnings for SHARED
authorWill Newton <will.newton@linaro.org>
Mon, 7 Jul 2014 14:14:26 +0000 (15:14 +0100)
committerWill Newton <will.newton@linaro.org>
Wed, 9 Jul 2014 08:26:07 +0000 (09:26 +0100)
The definition of SHARED is tested with #ifdef pretty much everywhere
apart from these few places. The tlsdesc.c code seems to be copy and
pasted to a few architectures and there is one instance in the hppa
startup code.

ChangeLog:

2014-07-09  Will Newton  <will.newton@linaro.org>

* sysdeps/aarch64/tlsdesc.c (_dl_unmap): Test SHARED with #ifdef.
* sysdeps/arm/tlsdesc.c (_dl_unmap): Likewise.
* sysdeps/i386/tlsdesc.c (_dl_unmap): Likewise.
* sysdeps/x86_64/tlsdesc.c (_dl_unmap): Likewise.
* sysdeps/hppa/start.S (_start): Likewise.

ChangeLog
sysdeps/aarch64/tlsdesc.c
sysdeps/arm/tlsdesc.c
sysdeps/hppa/start.S
sysdeps/i386/tlsdesc.c
sysdeps/x86_64/tlsdesc.c

index 0773d7c..2ac8b8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-07-09  Will Newton  <will.newton@linaro.org>
+
+       * sysdeps/aarch64/tlsdesc.c (_dl_unmap): Test SHARED with #ifdef.
+       * sysdeps/arm/tlsdesc.c (_dl_unmap): Likewise.
+       * sysdeps/i386/tlsdesc.c (_dl_unmap): Likewise.
+       * sysdeps/x86_64/tlsdesc.c (_dl_unmap): Likewise.
+       * sysdeps/hppa/start.S (_start): Likewise.
+
 2014-07-09  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        * sunrpc/xdr.c (xdr_string): Initialize SIZE to 0.
index 1b41819..7e8cf65 100644 (file)
@@ -147,7 +147,7 @@ _dl_unmap (struct link_map *map)
 {
   _dl_unmap_segments (map);
 
-#if SHARED
+#ifdef SHARED
   if (map->l_mach.tlsdesc_table)
     htab_delete (map->l_mach.tlsdesc_table);
 #endif
index e52034d..ad74a23 100644 (file)
@@ -149,7 +149,7 @@ _dl_unmap (struct link_map *map)
 {
   _dl_unmap_segments (map);
 
-#if SHARED
+#ifdef SHARED
   /* _dl_unmap is only called for dlopen()ed libraries, for which
      calling free() is safe, or before we've completed the initial
      relocation, in which case calling free() is probably pointless,
index 0998270..7254a75 100644 (file)
@@ -93,7 +93,7 @@ _start:
        stw     %r23, -56(%sp)
        /* Need to setup 1, 4, 5, and 7th arguments */
 
-#if SHARED
+#ifdef SHARED
        /* load main (1st argument) */
        addil   LT'.Lpmain, %r19
        ldw     RT'.Lpmain(%r1), %r26
index ef4a1dd..19a8788 100644 (file)
@@ -261,7 +261,7 @@ _dl_unmap (struct link_map *map)
 {
   _dl_unmap_segments (map);
 
-#if SHARED
+#ifdef SHARED
   if (map->l_mach.tlsdesc_table)
     htab_delete (map->l_mach.tlsdesc_table);
 #endif
index c1c5e03..451f7be 100644 (file)
@@ -139,7 +139,7 @@ _dl_unmap (struct link_map *map)
 {
   _dl_unmap_segments (map);
 
-#if SHARED
+#ifdef SHARED
   /* _dl_unmap is only called for dlopen()ed libraries, for which
      calling free() is safe, or before we've completed the initial
      relocation, in which case calling free() is probably pointless,