From bdbe95c8c583b4802d6aa88f2c45ff6f27ed657d Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 11 Jul 2001 09:26:27 +0000 Subject: [PATCH] Don't merge if the storage class of the non-debug symbol is C_NULL. --- gas/ChangeLog | 5 +++++ gas/config/obj-coff.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index e7112e1f5a..030fb1141e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2001-07-10 Mark Elbrecht + + * 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 * config/obj-elf.c (obj_elf_section): md_elf_section_change_data_hook diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index 30a5fe8998..9356c6e7b1 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -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)) -- 2.34.1