aboutsummaryrefslogtreecommitdiff
path: root/bfd/ecofflink.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-02-04 04:18:28 +0000
committerIan Lance Taylor <ian@airs.com>1994-02-04 04:18:28 +0000
commitcbc174e7abb4e8b38281aacadb21aa929fade447 (patch)
tree318454a23423f42c0b4e129185534494c8724122 /bfd/ecofflink.c
parentf85ad9d5c50571a4d242e10c1f720158a6d39970 (diff)
downloadgdb-cbc174e7abb4e8b38281aacadb21aa929fade447.zip
gdb-cbc174e7abb4e8b38281aacadb21aa929fade447.tar.gz
gdb-cbc174e7abb4e8b38281aacadb21aa929fade447.tar.bz2
* ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
symbol has a value in the ECOFF symbol but not in the BFD symbol, keep the value in the ECOFF symbol. This helps gas.
Diffstat (limited to 'bfd/ecofflink.c')
-rw-r--r--bfd/ecofflink.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c
index 523a4bf..306f028 100644
--- a/bfd/ecofflink.c
+++ b/bfd/ecofflink.c
@@ -991,7 +991,15 @@ bfd_ecoff_debug_externals (abfd, debug, swap, relocateable, get_extr,
if (bfd_is_com_section (sym_ptr->section)
|| sym_ptr->section == &bfd_und_section)
- esym.asym.value = sym_ptr->value;
+ {
+ /* FIXME: gas does not keep the value of a small undefined
+ symbol in the symbol itself, because of relocation
+ problems. */
+ if (esym.asym.sc != scSUndefined
+ || esym.asym.value == 0
+ || sym_ptr->value != 0)
+ esym.asym.value = sym_ptr->value;
+ }
else
esym.asym.value = (sym_ptr->value
+ sym_ptr->section->output_offset