* stabsread.c (patch_block_stabs): Don't create LOC_OPTIMIZED_OUT

symbols.  Reverts change of 2 Apr 1993.
This commit is contained in:
Jim Kingdon
1994-03-24 15:32:42 +00:00
parent 5801f3488e
commit acdec9542b
2 changed files with 13 additions and 0 deletions

View File

@@ -399,6 +399,14 @@ patch_block_stabs (symbols, stabs, objfile)
sym = find_symbol_in_list (symbols, name, pp-name);
if (!sym)
{
#if 0
/* The following code is disabled because AIX's xlc also
puts out a stab but no C_EXT in the case where a
symbol is referenced but not defined (in that
compilation unit). So we just don't create a symbol,
and the user will get the symbol from the compilation
unit in which the symbol is actually defined. */
/* On xcoff, if a global is defined and never referenced,
ld will remove it from the executable. There is then
a N_GSYM stab for it, but no regular (C_EXT) symbol. */
@@ -425,6 +433,7 @@ patch_block_stabs (symbols, stabs, objfile)
SYMBOL_TYPE (sym) = read_type (&pp, objfile);
}
add_symbol_to_list (sym, &global_symbols);
#endif /* 0 */
}
else
{