1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_endef): Don't merge labels, or symbols which do not have a constant value, or tags with non-tags. Remove the symbol from the list before adding it at the end.
This commit is contained in:
parent
23dab925ad
commit
9690c54dda
|
@ -5,6 +5,11 @@
|
||||||
|
|
||||||
1999-09-11 Donn Terry <donn@interix.com>
|
1999-09-11 Donn Terry <donn@interix.com>
|
||||||
|
|
||||||
|
* config/obj-coff.c (obj_coff_endef): Don't merge labels, or
|
||||||
|
symbols which do not have a constant value, or tags with
|
||||||
|
non-tags. Remove the symbol from the list before adding it at the
|
||||||
|
end.
|
||||||
|
|
||||||
* config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef
|
* config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef
|
||||||
C_FCN symbol differently if TE_PE.
|
C_FCN symbol differently if TE_PE.
|
||||||
(obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which
|
(obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which
|
||||||
|
|
|
@ -727,7 +727,10 @@ obj_coff_endef (ignore)
|
||||||
|
|
||||||
/* Now that we have built a debug symbol, try to find if we should
|
/* Now that we have built a debug symbol, try to find if we should
|
||||||
merge with an existing symbol or not. If a symbol is C_EFCN or
|
merge with an existing symbol or not. If a symbol is C_EFCN or
|
||||||
SEG_ABSOLUTE or untagged SEG_DEBUG it never merges. */
|
absolute_section or untagged SEG_DEBUG it never merges. We also
|
||||||
|
don't merge labels, which are in a different namespace, nor
|
||||||
|
symbols which have not yet been defined since they are typically
|
||||||
|
unique, nor do we merge tags with non-tags. */
|
||||||
|
|
||||||
/* Two cases for functions. Either debug followed by definition or
|
/* Two cases for functions. Either debug followed by definition or
|
||||||
definition followed by debug. For definition first, we will
|
definition followed by debug. For definition first, we will
|
||||||
|
@ -742,17 +745,25 @@ obj_coff_endef (ignore)
|
||||||
time. */
|
time. */
|
||||||
|
|
||||||
if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN
|
if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN
|
||||||
|
|| S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL
|
||||||
|| (!strcmp (bfd_get_section_name (stdoutput,
|
|| (!strcmp (bfd_get_section_name (stdoutput,
|
||||||
S_GET_SEGMENT (def_symbol_in_progress)),
|
S_GET_SEGMENT (def_symbol_in_progress)),
|
||||||
"*DEBUG*")
|
"*DEBUG*")
|
||||||
&& !SF_GET_TAG (def_symbol_in_progress))
|
&& !SF_GET_TAG (def_symbol_in_progress))
|
||||||
|| S_GET_SEGMENT (def_symbol_in_progress) == absolute_section
|
|| S_GET_SEGMENT (def_symbol_in_progress) == absolute_section
|
||||||
|| (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress), DO_NOT_STRIP)) == NULL)
|
|| ! symbol_constant_p (def_symbol_in_progress)
|
||||||
|
|| (symbolP = symbol_find_base (S_GET_NAME (def_symbol_in_progress),
|
||||||
|
DO_NOT_STRIP)) == NULL
|
||||||
|
|| SF_GET_TAG (def_symbol_in_progress) != SF_GET_TAG (symbolP))
|
||||||
{
|
{
|
||||||
|
/* If it already is at the end of the symbol list, do nothing */
|
||||||
if (def_symbol_in_progress != symbol_lastP)
|
if (def_symbol_in_progress != symbol_lastP)
|
||||||
|
{
|
||||||
|
symbol_remove (def_symbol_in_progress, &symbol_rootP, &symbol_lastP);
|
||||||
symbol_append (def_symbol_in_progress, symbol_lastP, &symbol_rootP,
|
symbol_append (def_symbol_in_progress, symbol_lastP, &symbol_rootP,
|
||||||
&symbol_lastP);
|
&symbol_lastP);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* This symbol already exists, merge the newly created symbol
|
/* This symbol already exists, merge the newly created symbol
|
||||||
|
|
Loading…
Reference in New Issue