aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1997-04-02 22:17:35 +0000
committerIan Lance Taylor <ian@airs.com>1997-04-02 22:17:35 +0000
commitf74e2365ddbb9298ddf861efd69f4383a857dc90 (patch)
tree34930b594cd9b57d21993d25dd668912f7d7e4e9 /bfd/elflink.h
parentd73607c5b5ffcfe3f06ae0ffe6669c96c9f908b9 (diff)
downloadgdb-f74e2365ddbb9298ddf861efd69f4383a857dc90.zip
gdb-f74e2365ddbb9298ddf861efd69f4383a857dc90.tar.gz
gdb-f74e2365ddbb9298ddf861efd69f4383a857dc90.tar.bz2
* elflink.h (elf_link_add_object_symbols): When there is a size
change, use the larger size. From H.J. Lu <hjl@gnu.ai.mit.edu>.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index dcb1a8b..699b015 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -998,11 +998,15 @@ elf_link_add_object_symbols (abfd, info)
{
if (h->size != 0 && h->size != sym.st_size && ! size_change_ok)
(*_bfd_error_handler)
- ("Warning: size of symbol `%s' changed from %lu to %lu in %s",
- name, (unsigned long) h->size, (unsigned long) sym.st_size,
- bfd_get_filename (abfd));
-
- h->size = sym.st_size;
+ ("Warning: size of symbol `%s' was %lu, but in %s is %lu; using %lu",
+ name, (unsigned long) h->size,
+ bfd_get_filename (abfd), (unsigned long) sym.st_size,
+ (h->size < sym.st_size
+ ? (unsigned long) sym.st_size
+ : (unsigned long) h->size));
+
+ if (h->size < sym.st_size)
+ h->size = sym.st_size;
}
if (ELF_ST_TYPE (sym.st_info) != STT_NOTYPE
&& (definition || h->type == STT_NOTYPE))