aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-05-15 20:40:54 +0000
committerIan Lance Taylor <ian@airs.com>1997-05-15 20:40:54 +0000
commit031dfce06fa5164421b22e48c00f623e00f57faf (patch)
treea98d28eb0019872cedf8af5ea33807fd61fc9afd
parentde046e7c427b9e7efb9217c4d61fda9abecd1b9f (diff)
downloadgdb-031dfce06fa5164421b22e48c00f623e00f57faf.zip
gdb-031dfce06fa5164421b22e48c00f623e00f57faf.tar.gz
gdb-031dfce06fa5164421b22e48c00f623e00f57faf.tar.bz2
* elflink.h (elf_link_add_object_symbols): Force ELF symbol size
to common symbol size.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.h9
2 files changed, 14 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1fd14c4..3b1295c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * elflink.h (elf_link_add_object_symbols): Force ELF symbol size
+ to common symbol size.
+
Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
* archures.c (constants): Added new constants to identify the
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 8ab07e6..43425c0 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -1034,6 +1034,15 @@ elf_link_add_object_symbols (abfd, info)
h->size = sym.st_size;
}
+
+ /* If this is a common symbol, then we always want H->SIZE
+ to be the size of the common symbol. The code just above
+ won't fix the size if a common symbol becomes larger. We
+ don't warn about a size change here, because that is
+ covered by --warn-common. */
+ if (h->root.type == bfd_link_hash_common)
+ h->size = h->root.u.c.size;
+
if (ELF_ST_TYPE (sym.st_info) != STT_NOTYPE
&& (definition || h->type == STT_NOTYPE))
{