* xcoffread.c (process_xcoff_symbol): Only change 'V' to 'S' if not

within_function.
This commit is contained in:
Jim Kingdon 1994-01-16 20:09:59 +00:00
parent 5bac802232
commit 91cc45dacc
2 changed files with 20 additions and 16 deletions

View File

@ -1,5 +1,8 @@
Sun Jan 16 12:46:01 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* xcoffread.c (process_xcoff_symbol): Only change 'V' to 'S' if not
within_function.
* Makefile.in: Add mostlyclean target.
Sat Jan 15 10:20:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)

View File

@ -1629,24 +1629,25 @@ process_xcoff_symbol (cs, objfile)
case C_STSYM:
/* If we are going to use Sun dbx's define_symbol(), we need to
massage our stab string a little. Change 'V' type to 'S' to be
comparible with Sun. */
/* FIXME: Is this to avoid a Sun-specific hack somewhere?
Needs more investigation. */
/* For xlc (not GCC), the 'V' symbol descriptor is used for all
statics and we need to distinguish file-scope versus function-scope
using within_function. We do this by changing the string we pass
to define_symbol to use 'S' where we need to, which is not necessarily
super-clean, but seems workable enough. */
if (*name == ':' || (pp = (char *) strchr(name, ':')) == NULL)
return NULL;
if (*name == ':' || (pp = (char *) strchr(name, ':')) == NULL)
return NULL;
++pp;
if (*pp == 'V') *pp = 'S';
sym = define_symbol (cs->c_value, cs->c_name, 0, 0, objfile);
if (sym != NULL)
{
SYMBOL_VALUE (sym) += static_block_base;
SYMBOL_SECTION (sym) = static_block_section;
}
return sym;
++pp;
if (*pp == 'V' && !within_function)
*pp = 'S';
sym = define_symbol (cs->c_value, cs->c_name, 0, 0, objfile);
if (sym != NULL)
{
SYMBOL_VALUE (sym) += static_block_base;
SYMBOL_SECTION (sym) = static_block_section;
}
return sym;
case C_LSYM:
sym = define_symbol (cs->c_value, cs->c_name, 0, N_LSYM, objfile);