aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-12-29 17:56:32 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-12-29 17:56:32 +0000
commit83ad0046cfa785068be98b08efadcad6854c1a12 (patch)
treefd3c84f19043a172332e720400633bf3e58bfb6d /bfd
parent9b134994af00aa5ea49f4af20b3f35f2d935c2a8 (diff)
downloadgdb-83ad0046cfa785068be98b08efadcad6854c1a12.zip
gdb-83ad0046cfa785068be98b08efadcad6854c1a12.tar.gz
gdb-83ad0046cfa785068be98b08efadcad6854c1a12.tar.bz2
bfd/
2006-12-29 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (elf_link_add_object_symbols): Remember the symbol size only if it is defined. ld/testsuite/ 2006-12-29 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/wrap.exp: New file. * ld-elf/wrap1.c: Likewise. * ld-elf/wrap1.out: Likewise. * ld-elf/wrap1a.c: Likewise. * ld-elf/wrap1b.c: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index e0b3a63..5a74f9c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (elf_link_add_object_symbols): Remember the symbol
+ size only if it is defined.
+
2006-12-25 Kazu Hirata <kazu@codesourcery.com>
* archures.c (bfd_mach_cpu32_fido): New.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 6af091b..10b9bcd 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -4035,11 +4035,13 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
}
- /* Remember the symbol size and type. */
- if (isym->st_size != 0
+ /* Remember the symbol size if it isn't undefined. */
+ if ((isym->st_size != 0 && isym->st_shndx != SHN_UNDEF)
&& (definition || h->size == 0))
{
- if (h->size != 0 && h->size != isym->st_size && ! size_change_ok)
+ if (h->size != 0
+ && h->size != isym->st_size
+ && ! size_change_ok)
(*_bfd_error_handler)
(_("Warning: size of symbol `%s' changed"
" from %lu in %B to %lu in %B"),