diff options
author | Nick Clifton <nickc@redhat.com> | 2003-04-15 09:38:11 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-04-15 09:38:11 +0000 |
commit | ca4fa240d6b9d4d7a2b3131ae47689530351674b (patch) | |
tree | 86ea0a9484217062b32eedcc7fba9607873216fd /bfd | |
parent | c2dcd04ec8f55fb69fabb24fae58555b5ab0a684 (diff) | |
download | fsf-binutils-gdb-ca4fa240d6b9d4d7a2b3131ae47689530351674b.zip fsf-binutils-gdb-ca4fa240d6b9d4d7a2b3131ae47689530351674b.tar.gz fsf-binutils-gdb-ca4fa240d6b9d4d7a2b3131ae47689530351674b.tar.bz2 |
Properly report filename for alignment reduction.
Add test for alignment reduction.
Diffstat (limited to 'bfd')
-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 080cc0c..b253ee6 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 780e341..12f91ef 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. */ |