Don't merge if the storage class of the non-debug symbol is C_NULL.

This commit is contained in:
Nick Clifton 2001-07-11 09:26:27 +00:00
parent 936742abbe
commit bdbe95c8c5
2 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2001-07-10 Mark Elbrecht <snowball3@softhome.net>
* config/obj-coff.c (coff_frob_symbol): Don't merge if the storage
class of the non-debug symbol is C_NULL.
2001-07-10 John Healy <jhealy@redhat.com>
* config/obj-elf.c (obj_elf_section): md_elf_section_change_data_hook

View file

@ -1174,18 +1174,21 @@ coff_frob_symbol (symp, punt)
if (!SF_GET_DEBUG (symp))
{
symbolS *real;
symbolS * real;
if (!SF_GET_LOCAL (symp)
&& !SF_GET_STATICS (symp)
&& S_GET_STORAGE_CLASS (symp) != C_LABEL
&& symbol_constant_p(symp)
&& (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP))
&& S_GET_STORAGE_CLASS (real) == C_NULL
&& real != symp)
{
c_symbol_merge (symp, real);
*punt = 1;
return;
}
if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp))
{
assert (S_GET_VALUE (symp) == 0);
@ -1199,6 +1202,7 @@ coff_frob_symbol (symp, punt)
else
S_SET_STORAGE_CLASS (symp, C_STAT);
}
if (SF_GET_PROCESS (symp))
{
if (S_GET_STORAGE_CLASS (symp) == C_BLOCK)
@ -1208,6 +1212,7 @@ coff_frob_symbol (symp, punt)
else
{
symbolS *begin;
begin = *(symbolS **) stack_pop (block_stack);
if (begin == 0)
as_warn (_("mismatched .eb"));
@ -1215,9 +1220,11 @@ coff_frob_symbol (symp, punt)
next_set_end = begin;
}
}
if (coff_last_function == 0 && SF_GET_FUNCTION (symp))
{
union internal_auxent *auxp;
coff_last_function = symp;
if (S_GET_NUMBER_AUXILIARY (symp) < 1)
S_SET_NUMBER_AUXILIARY (symp, 1);
@ -1225,6 +1232,7 @@ coff_frob_symbol (symp, punt)
memset (auxp->x_sym.x_fcnary.x_ary.x_dimen, 0,
sizeof (auxp->x_sym.x_fcnary.x_ary.x_dimen));
}
if (S_GET_STORAGE_CLASS (symp) == C_EFCN)
{
if (coff_last_function == 0)
@ -1236,6 +1244,7 @@ coff_frob_symbol (symp, punt)
coff_last_function = 0;
}
}
if (S_IS_EXTERNAL (symp))
S_SET_STORAGE_CLASS (symp, C_EXT);
else if (SF_GET_LOCAL (symp))