aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-03-26 06:08:14 +0000
committerAlan Modra <amodra@gmail.com>2013-03-26 06:08:14 +0000
commit3a81e8251e18c6266f5b1c5147a9264da30fc5f0 (patch)
treedefdbf0b24c6dfd11013b80a9c48645432fde794 /bfd
parent9f9e404c046a14a2d515bb21ca96718dcc03810e (diff)
downloadgdb-3a81e8251e18c6266f5b1c5147a9264da30fc5f0.zip
gdb-3a81e8251e18c6266f5b1c5147a9264da30fc5f0.tar.gz
gdb-3a81e8251e18c6266f5b1c5147a9264da30fc5f0.tar.bz2
* elflink.c (elf_link_add_object_symbols): Add assertion for
common override alignment check code. Formatting.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4a4b192..30e64ba 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 792c47c..15909c2 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -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