* elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
authorAlan Modra <amodra@gmail.com>
Thu, 18 Aug 2005 01:28:26 +0000 (01:28 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 18 Aug 2005 01:28:26 +0000 (01:28 +0000)
zero size dynamic variables.
* elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
* elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
* elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
* elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
* elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
* elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
* elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
* elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
* elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
* elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
* elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
* elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.

18 files changed:
bfd/ChangeLog
bfd/elf-m10300.c
bfd/elf32-arm.c
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-m32r.c
bfd/elf32-m68k.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sh.c
bfd/elf32-vax.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-x86-64.c
bfd/elfxx-sparc.c

index af031e0b8cb7120041cd033c7c787b252a1b35a5..27b62311064c969ed0db2c4f5e9613f8f4582a75 100644 (file)
@@ -1,3 +1,24 @@
+2005-08-18  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
+       zero size dynamic variables.
+       * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
+       * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
+       * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
+       * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
+       * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
+       * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
+       * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
+       * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
+       * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+       * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
+       * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
+       * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
+       * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+       * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
+       * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
+       * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
+
 2005-08-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR binutils/1179
index b3f80449db279a7c2a9fd9ac7c2b55cb040e3b2f..3935c85edda14dcce089db31e7fa62f568c50d1e 100644 (file)
@@ -4099,6 +4099,13 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (info, h)
   if (!h->non_got_ref)
     return TRUE;
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 2dc153f51aced524d6bb601248b1f414e7642f20..9bc7eefe4bb31217c620b0b5f7c70db9a006d136 100644 (file)
@@ -5388,6 +5388,13 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
   if (info->shared || globals->root.is_relocatable_executable)
     return TRUE;
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 618210a1215ddc6cc69bce6ef6de4a24dacffea5..4580beabd9024e8fa395aaa070f507aeacf32218 100644 (file)
@@ -2380,6 +2380,13 @@ elf_cris_adjust_dynamic_symbol (info, h)
   if (!h->non_got_ref)
     return TRUE;
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index e3c45ec9ef52a99c90a43489bc9ca119881118b5..7f20bd6aa235ac6d55dafc919bec106b8d95803e 100644 (file)
@@ -1807,6 +1807,13 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
        }
     }
 
+  if (eh->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            eh->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 406248937b26eb17ee82120e1f8979f022ba8fd8..c9c4433780546326480e259e1bd0d6dafe28fce0 100644 (file)
@@ -486,6 +486,13 @@ i370_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
   if (info->shared)
     return TRUE;
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 48e76e916e80375cff3cdaddb743e7ae7ee4d077..a2f1b1c6603e404e930695c9e121793c2a079adf 100644 (file)
@@ -1462,6 +1462,13 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
        }
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 082f496ccd032310f10998921d41ca4d88b10627..d2f850891e3fb08802d2b8f092274dd89dff0b30 100644 (file)
@@ -1911,6 +1911,13 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
       return TRUE;
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index db320c229cd69686f3681e2ca2cf4e08afdb4b23..71f98bb671662f1f2b60dc3635c0f8c34e7a9f46 100644 (file)
@@ -1081,6 +1081,13 @@ elf_m68k_adjust_dynamic_symbol (info, h)
   if (info->shared)
     return TRUE;
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 168e58cdaf32888a57058e5e4de3dee00a285619..bfb1ee83905a4d52d98974222a1ac68e3b8e2400 100644 (file)
@@ -4147,6 +4147,13 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
        }
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 713ad66acde0613258c134bd05df570b69f75857..9001a51cde87774923874a5af0038d74cf360923 100644 (file)
@@ -1683,6 +1683,13 @@ elf_s390_adjust_dynamic_symbol (info, h)
        }
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index b62881ce537c00b4bf6ab4fd1f3b051cab12ac7d..364ef237dd130c430da9c335bb4cb2998ef623e8 100644 (file)
@@ -3915,6 +3915,13 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
       return TRUE;
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 8faf99c519016b76ebe23003ae1de595d6255491..7a150ba7396794cdf062fb1b37f523c343b005f5 100644 (file)
@@ -1054,6 +1054,13 @@ elf_vax_adjust_dynamic_symbol (info, h)
   if (info->shared)
     return TRUE;
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 31ad3d0e305c09ee28de6258123c9cbeee0ef788..3f219fa9d725b33b752cd19ec450251d2935ecfe 100644 (file)
@@ -5712,6 +5712,13 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
   /* This is a reference to a symbol defined by a dynamic object which
      is not a function.  */
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index d5ce602257f66c99d2e338b86db9b4eefe844d08..38ce556446a97fada62785f99bc0e140413f5173 100644 (file)
@@ -1655,6 +1655,13 @@ elf_s390_adjust_dynamic_symbol (info, h)
        }
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 9fb6c3e7e10fd5b1b8a1f102ad686c23855c009f..337b1809c8bd2f16515ccad36ba6e6838d9ef8a7 100644 (file)
@@ -3434,6 +3434,13 @@ sh64_elf64_adjust_dynamic_symbol (struct bfd_link_info *info,
   if (!h->non_got_ref)
     return TRUE;
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index 7b06ef4a71aa74f95a687d468f0f814db5dbc775..8511a1643c25a83c6eb002ba31136108facfb28a 100644 (file)
@@ -1247,6 +1247,13 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
        }
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.         There will be
      an entry for this symbol in the .dynsym section.  The dynamic
index b8b87c91284ecd4852643d9d8018fb6d85b19edf..b83cd140d8fc79861940105de600877609ccecef 100644 (file)
@@ -1716,6 +1716,13 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
       return TRUE;
     }
 
+  if (h->size == 0)
+    {
+      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
+                            h->root.root.string);
+      return TRUE;
+    }
+
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
This page took 0.092743 seconds and 4 git commands to generate.