25845f
commit 82374e65d745c3c94258ad81c38f8af34b9f9113
25845f
Author: Will Newton <will.newton@linaro.org>
25845f
Date:   Mon Jul 7 15:14:26 2014 +0100
25845f
25845f
    Fix -Wundef warnings for SHARED
25845f
    
25845f
    The definition of SHARED is tested with #ifdef pretty much everywhere
25845f
    apart from these few places. The tlsdesc.c code seems to be copy and
25845f
    pasted to a few architectures and there is one instance in the hppa
25845f
    startup code.
25845f
    
25845f
    ChangeLog:
25845f
    
25845f
    2014-07-09  Will Newton  <will.newton@linaro.org>
25845f
    
25845f
            * sysdeps/aarch64/tlsdesc.c (_dl_unmap): Test SHARED with #ifdef.
25845f
            * sysdeps/arm/tlsdesc.c (_dl_unmap): Likewise.
25845f
            * sysdeps/i386/tlsdesc.c (_dl_unmap): Likewise.
25845f
            * sysdeps/x86_64/tlsdesc.c (_dl_unmap): Likewise.
25845f
            * sysdeps/hppa/start.S (_start): Likewise.
25845f
25845f
diff --git a/sysdeps/aarch64/tlsdesc.c b/sysdeps/aarch64/tlsdesc.c
25845f
index 606ce797c66ce84d..1543064999964dd9 100644
25845f
--- a/sysdeps/aarch64/tlsdesc.c
25845f
+++ b/sysdeps/aarch64/tlsdesc.c
25845f
@@ -147,7 +147,7 @@ _dl_unmap (struct link_map *map)
25845f
   __munmap ((void *) (map)->l_map_start,
25845f
 	    (map)->l_map_end - (map)->l_map_start);
25845f
 
25845f
-#if SHARED
25845f
+#ifdef SHARED
25845f
   if (map->l_mach.tlsdesc_table)
25845f
     htab_delete (map->l_mach.tlsdesc_table);
25845f
 #endif
25845f
diff --git a/sysdeps/arm/tlsdesc.c b/sysdeps/arm/tlsdesc.c
25845f
index c5e69a8755147361..dd8d340d740876d9 100644
25845f
--- a/sysdeps/arm/tlsdesc.c
25845f
+++ b/sysdeps/arm/tlsdesc.c
25845f
@@ -149,7 +149,7 @@ _dl_unmap (struct link_map *map)
25845f
   __munmap ((void *) (map)->l_map_start,
25845f
 	    (map)->l_map_end - (map)->l_map_start);
25845f
 
25845f
-#if SHARED
25845f
+#ifdef SHARED
25845f
   /* _dl_unmap is only called for dlopen()ed libraries, for which
25845f
      calling free() is safe, or before we've completed the initial
25845f
      relocation, in which case calling free() is probably pointless,
25845f
diff --git a/sysdeps/hppa/start.S b/sysdeps/hppa/start.S
25845f
index 97196bd52df23391..08b13ee4f4a0937c 100644
25845f
--- a/sysdeps/hppa/start.S
25845f
+++ b/sysdeps/hppa/start.S
25845f
@@ -93,7 +93,7 @@ _start:
25845f
 	stw	%r23, -56(%sp)
25845f
 	/* Need to setup 1, 4, 5, and 7th arguments */
25845f
 
25845f
-#if SHARED
25845f
+#ifdef SHARED
25845f
 	/* load main (1st argument) */
25845f
 	addil	LT'.Lpmain, %r19
25845f
 	ldw	RT'.Lpmain(%r1), %r26
25845f
diff --git a/sysdeps/i386/tlsdesc.c b/sysdeps/i386/tlsdesc.c
25845f
index 2d55c63cdb976d79..cfde1a684850e04c 100644
25845f
--- a/sysdeps/i386/tlsdesc.c
25845f
+++ b/sysdeps/i386/tlsdesc.c
25845f
@@ -261,7 +261,7 @@ _dl_unmap (struct link_map *map)
25845f
   __munmap ((void *) (map)->l_map_start,
25845f
 	    (map)->l_map_end - (map)->l_map_start);
25845f
 
25845f
-#if SHARED
25845f
+#ifdef SHARED
25845f
   if (map->l_mach.tlsdesc_table)
25845f
     htab_delete (map->l_mach.tlsdesc_table);
25845f
 #endif
25845f
diff --git a/sysdeps/x86_64/tlsdesc.c b/sysdeps/x86_64/tlsdesc.c
25845f
index 19d55a7c91992439..8def142e87c298be 100644
25845f
--- a/sysdeps/x86_64/tlsdesc.c
25845f
+++ b/sysdeps/x86_64/tlsdesc.c
25845f
@@ -139,7 +139,7 @@ _dl_unmap (struct link_map *map)
25845f
   __munmap ((void *) (map)->l_map_start,
25845f
 	    (map)->l_map_end - (map)->l_map_start);
25845f
 
25845f
-#if SHARED
25845f
+#ifdef SHARED
25845f
   /* _dl_unmap is only called for dlopen()ed libraries, for which
25845f
      calling free() is safe, or before we've completed the initial
25845f
      relocation, in which case calling free() is probably pointless,