PR binutils/2735

* elflink.c (elf_link_add_object_symbols): Fix the warning message about
  mismatched alignments to allow for the case where the common alignment
  has been deduced from the section alignment.
* bfd.c (_bfd_default_error_handler): Update comment to explain why bfd
  and asection varargs are out of order.
  Explicitly catch and abort on NULL bfd and asection arguments.
This commit is contained in:
Nick Clifton
2006-06-12 11:12:51 +00:00
parent 13dce8ef13
commit d07676f875
3 changed files with 52 additions and 7 deletions

View File

@ -3922,11 +3922,21 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
if (normal_align < common_align)
(*_bfd_error_handler)
(_("Warning: alignment %u of symbol `%s' in %B"
" is smaller than %u in %B"),
normal_bfd, common_bfd,
1 << normal_align, name, 1 << common_align);
{
/* PR binutils/2735 */
if (normal_bfd == NULL)
(*_bfd_error_handler)
(_("Warning: alignment %u of common symbol `%s' in %B"
" is greater than the alignment (%u) of its section %A"),
common_bfd, h->root.u.def.section,
1 << common_align, name, 1 << normal_align);
else
(*_bfd_error_handler)
(_("Warning: alignment %u of symbol `%s' in %B"
" is smaller than %u in %B"),
normal_bfd, common_bfd,
1 << normal_align, name, 1 << common_align);
}
}
/* Remember the symbol size and type. */