summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2013-03-26 06:08:14 +0000
committerAlan Modra <amodra@bigpond.net.au>2013-03-26 06:08:14 +0000
commit52e1b4f1223f78b4cccc509bad6241603b2eb80a (patch)
tree0199ffcde4b119497d80045eba957b70912c26ce /bfd/elflink.c
parent834992791e43f4f8f6340ca66c797c5bf9b8b9c8 (diff)
downloadbinutils-redhat-52e1b4f1223f78b4cccc509bad6241603b2eb80a.tar.gz
* elflink.c (elf_link_add_object_symbols): Add assertion for
common override alignment check code. Formatting.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 792c47cfc5..15909c205d 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