* elflink.c (elf_link_add_object_symbols): Add assertion for
authorAlan Modra <amodra@gmail.com>
Tue, 26 Mar 2013 06:08:14 +0000 (06:08 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 26 Mar 2013 06:08:14 +0000 (06:08 +0000)
common override alignment check code.  Formatting.

bfd/ChangeLog
bfd/elflink.c

index 4a4b192e6c7a20ccb7961a9cec8fe86b90a771ac..30e64ba3623c18273c3ce7bd664f989183fabbcb 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-26  Alan Modra  <amodra@gmail.com>
+
+       * elflink.c (elf_link_add_object_symbols): Add assertion for
+       common override alignment check code.  Formatting.
+
 2013-03-25  Alan Modra  <amodra@gmail.com>
 
        * elflink.c (_bfd_elf_merge_symbol): Set old_alignment for
index 792c47cfc5f3ee4c080962e14c472cc67e74cf8f..15909c205d514ca98ea7fa380787fd9b8f52074b 100644 (file)
@@ -4255,6 +4255,9 @@ error_free_dyn:
              bfd *normal_bfd;
              bfd *common_bfd;
 
+             BFD_ASSERT (h->root.type == bfd_link_hash_defined
+                         || h->root.type == bfd_link_hash_defweak);
+
              symbol_align = ffs (h->root.u.def.value) - 1;
              if (h->root.u.def.section->owner != NULL
                  && (h->root.u.def.section->owner->flags & DYNAMIC) == 0)
@@ -4298,7 +4301,8 @@ error_free_dyn:
            }
 
          /* Remember the symbol size if it isn't undefined.  */
-         if ((isym->st_size != 0 && isym->st_shndx != SHN_UNDEF)
+         if (isym->st_size != 0
+             && isym->st_shndx != SHN_UNDEF
              && (definition || h->size == 0))
            {
              if (h->size != 0