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> 2001-07-10 John Healy <jhealy@redhat.com>
* config/obj-elf.c (obj_elf_section): md_elf_section_change_data_hook * config/obj-elf.c (obj_elf_section): md_elf_section_change_data_hook

View File

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