mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-25 02:43:21 +08:00
2011-03-30 Tristan Gingold <gingold@adacore.com>
* config/tc-ppc.c (ppc_frob_symbol): Convert stsym symbols value to offset only if within is set. (ppc_stabx): Reformat. For stsym stabs, add a check and set within only for symbols.
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
2011-03-30 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* config/tc-ppc.c (ppc_frob_symbol): Convert stsym symbols value
|
||||
to offset only if within is set.
|
||||
(ppc_stabx): Reformat. For stsym stabs, add a check and set
|
||||
within only for symbols.
|
||||
|
||||
2011-03-29 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR 12610
|
||||
|
@ -3747,10 +3747,8 @@ ppc_stabx (int ignore ATTRIBUTE_UNUSED)
|
||||
|
||||
symbol_get_tc (sym)->output = 1;
|
||||
|
||||
if (S_GET_STORAGE_CLASS (sym) == C_STSYM) {
|
||||
|
||||
symbol_get_tc (sym)->within = ppc_current_block;
|
||||
|
||||
if (S_GET_STORAGE_CLASS (sym) == C_STSYM)
|
||||
{
|
||||
/* In this case :
|
||||
|
||||
.bs name
|
||||
@ -3766,6 +3764,10 @@ ppc_stabx (int ignore ATTRIBUTE_UNUSED)
|
||||
|
||||
if (exp.X_op == O_symbol)
|
||||
{
|
||||
if (ppc_current_block == NULL)
|
||||
as_bad (_(".stabx of storage class stsym must be within .bs/.es"));
|
||||
|
||||
symbol_get_tc (sym)->within = ppc_current_block;
|
||||
symbol_get_tc (exp.X_add_symbol)->within = ppc_current_block;
|
||||
}
|
||||
}
|
||||
@ -5401,13 +5403,22 @@ ppc_frob_symbol (symbolS *sym)
|
||||
else if (S_GET_STORAGE_CLASS (sym) == C_STSYM)
|
||||
{
|
||||
symbolS *block;
|
||||
valueT base;
|
||||
|
||||
block = symbol_get_tc (sym)->within;
|
||||
if (block)
|
||||
{
|
||||
/* The value is the offset from the enclosing csect. */
|
||||
symbolS *csect;
|
||||
|
||||
/* The value is the offset from the enclosing csect. */
|
||||
block = symbol_get_tc (sym)->within;
|
||||
csect = symbol_get_tc (block)->within;
|
||||
resolve_symbol_value (csect);
|
||||
S_SET_VALUE (sym, S_GET_VALUE (sym) - S_GET_VALUE (csect));
|
||||
base = S_GET_VALUE (csect);
|
||||
}
|
||||
else
|
||||
base = 0;
|
||||
|
||||
S_SET_VALUE (sym, S_GET_VALUE (sym) - base);
|
||||
}
|
||||
else if (S_GET_STORAGE_CLASS (sym) == C_BINCL
|
||||
|| S_GET_STORAGE_CLASS (sym) == C_EINCL)
|
||||
|
Reference in New Issue
Block a user