diff options
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.h | 26 |
2 files changed, 25 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 080cc0cd9d8..b253ee62cec 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-04-15 H.J. Lu <hjl@gnu.org> + + * elflink.h (elf_link_add_object_symbols): Properly report + filename for alignment reduction. + 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com> * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'. diff --git a/bfd/elflink.h b/bfd/elflink.h index 780e341d42c..12f91ef4ef5 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -1929,7 +1929,11 @@ elf_link_add_object_symbols (abfd, info) if ((old_alignment || isym->st_shndx == SHN_COMMON) && h->root.type != bfd_link_hash_common) { - unsigned int common_align, normal_align, symbol_align; + unsigned int common_align; + unsigned int normal_align; + unsigned int symbol_align; + bfd *normal_bfd; + bfd *common_bfd; symbol_align = ffs (h->root.u.def.value) - 1; if ((h->root.u.def.section->owner->flags & DYNAMIC) == 0) @@ -1942,16 +1946,26 @@ elf_link_add_object_symbols (abfd, info) normal_align = symbol_align; if (old_alignment) - common_align = old_alignment; + { + common_align = old_alignment; + common_bfd = old_bfd; + normal_bfd = abfd; + } else - common_align = bfd_log2 (isym->st_value); + { + common_align = bfd_log2 (isym->st_value); + common_bfd = abfd; + normal_bfd = old_bfd; + } if (normal_align < common_align) (*_bfd_error_handler) (_("Warning: alignment %u of symbol `%s' in %s is smaller than %u in %s"), - 1 << normal_align, name, - bfd_archive_filename (old_bfd), - 1 << common_align, bfd_archive_filename (abfd)); + 1 << normal_align, + name, + bfd_archive_filename (normal_bfd), + 1 << common_align, + bfd_archive_filename (common_bfd)); } /* Remember the symbol size and type. */ |