* ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
authorIan Lance Taylor <ian@airs.com>
Fri, 4 Feb 1994 04:18:28 +0000 (04:18 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 4 Feb 1994 04:18:28 +0000 (04:18 +0000)
symbol has a value in the ECOFF symbol but not in the BFD symbol,
keep the value in the ECOFF symbol.  This helps gas.

bfd/ChangeLog
bfd/ecofflink.c

index 63c37380021d86d41bb197e3cc0c47ae712bbd2f..976140ffcccc09bbac38f616539bbc5bde5c1c12 100644 (file)
@@ -1,5 +1,9 @@
 Thu Feb  3 16:49:35 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
+       * 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.
+
        * linker.c (_bfd_generic_link_output_symbols,
        _bfd_generic_link_write_global_symbol): Don't require that all
        references to a common symbol be themselves common symbols.
index 523a4bf6c69f509c58878825966f740d9c01ea2c..306f028e11637e0a9e25b7a2c8fcf57f46d4e000 100644 (file)
@@ -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
This page took 0.037234 seconds and 4 git commands to generate.