mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
build file symbol fwd pointers properly, don't deref symbol #s as pointers
This commit is contained in:
@ -1353,12 +1353,12 @@ stack *block_stack;
|
|||||||
symbolS *last_functionP = NULL;
|
symbolS *last_functionP = NULL;
|
||||||
symbolS *last_tagP;
|
symbolS *last_tagP;
|
||||||
|
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
DEFUN_VOID (yank_symbols)
|
DEFUN_VOID (yank_symbols)
|
||||||
{
|
{
|
||||||
symbolS *symbolP;
|
symbolS *symbolP;
|
||||||
unsigned int symbol_number = 0;
|
unsigned int symbol_number = 0;
|
||||||
|
unsigned int last_file_symno = 0;
|
||||||
|
|
||||||
for (symbolP = symbol_rootP;
|
for (symbolP = symbol_rootP;
|
||||||
symbolP;
|
symbolP;
|
||||||
@ -1456,10 +1456,9 @@ DEFUN_VOID (yank_symbols)
|
|||||||
sizeof (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen));
|
sizeof (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* The C_FCN doesn't need any additional information.
|
/* The C_FCN doesn't need any additional information. I
|
||||||
I don't even know if this is needed for sdb. But the
|
don't even know if this is needed for sdb. But the
|
||||||
standard assembler generates it, so...
|
standard assembler generates it, so... */
|
||||||
*/
|
|
||||||
if (S_GET_STORAGE_CLASS (symbolP) == C_EFCN)
|
if (S_GET_STORAGE_CLASS (symbolP) == C_EFCN)
|
||||||
{
|
{
|
||||||
if (last_functionP == (symbolS *) 0)
|
if (last_functionP == (symbolS *) 0)
|
||||||
@ -1488,8 +1487,8 @@ DEFUN_VOID (yank_symbols)
|
|||||||
{
|
{
|
||||||
if (S_GET_VALUE (symbolP))
|
if (S_GET_VALUE (symbolP))
|
||||||
{
|
{
|
||||||
S_SET_VALUE ((symbolS *) S_GET_VALUE (symbolP), symbol_number);
|
S_SET_VALUE (symbolP, last_file_symno);
|
||||||
S_SET_VALUE (symbolP, 0);
|
last_file_symno = symbol_number;
|
||||||
} /* no one points at the first .file symbol */
|
} /* no one points at the first .file symbol */
|
||||||
} /* if debug or tag or eos or file */
|
} /* if debug or tag or eos or file */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user