Line 5350... |
Line 5350... |
|
|
symbol_remove (sym, &symbol_rootP, &symbol_lastP);
|
symbol_remove (sym, &symbol_rootP, &symbol_lastP);
|
symbol_append (sym, symbol_get_tc (ppc_current_csect)->within,
|
symbol_append (sym, symbol_get_tc (ppc_current_csect)->within,
|
&symbol_rootP, &symbol_lastP);
|
&symbol_rootP, &symbol_lastP);
|
symbol_get_tc (ppc_current_csect)->within = sym;
|
symbol_get_tc (ppc_current_csect)->within = sym;
|
|
symbol_get_tc (sym)->within = ppc_current_csect;
|
}
|
}
|
|
|
#ifdef OBJ_ELF
|
#ifdef OBJ_ELF
|
dwarf2_emit_label (sym);
|
dwarf2_emit_label (sym);
|
#endif
|
#endif
|
Line 5839... |
Line 5840... |
|| ppc_toc_csect == NULL
|
|| ppc_toc_csect == NULL
|
|| val < ppc_toc_frag->fr_address
|
|| val < ppc_toc_frag->fr_address
|
|| (ppc_after_toc_frag != NULL
|
|| (ppc_after_toc_frag != NULL
|
&& val >= ppc_after_toc_frag->fr_address)))
|
&& val >= ppc_after_toc_frag->fr_address)))
|
{
|
{
|
symbolS *csect;
|
symbolS *csect = tc->within;
|
symbolS *next_csect;
|
|
|
|
if (symseg == text_section)
|
|
csect = ppc_text_csects;
|
|
else if (symseg == data_section)
|
|
csect = ppc_data_csects;
|
|
else
|
|
abort ();
|
|
|
|
/* Skip the initial dummy symbol. */
|
|
csect = symbol_get_tc (csect)->next;
|
|
|
|
if (csect != (symbolS *) NULL)
|
|
{
|
|
while ((next_csect = symbol_get_tc (csect)->next) != (symbolS *) NULL
|
|
&& (symbol_get_frag (next_csect)->fr_address <= val))
|
|
{
|
|
/* If the csect address equals the symbol value, then we
|
|
have to look through the full symbol table to see
|
|
whether this is the csect we want. Note that we will
|
|
only get here if the csect has zero length. */
|
|
if (symbol_get_frag (csect)->fr_address == val
|
|
&& S_GET_VALUE (csect) == val)
|
|
{
|
|
symbolS *scan;
|
|
|
|
for (scan = symbol_next (csect);
|
|
scan != NULL;
|
|
scan = symbol_next (scan))
|
|
{
|
|
if (symbol_get_tc (scan)->subseg != 0)
|
|
break;
|
|
if (scan == fix->fx_addsy)
|
|
break;
|
|
}
|
|
|
|
/* If we found the symbol before the next csect
|
|
symbol, then this is the csect we want. */
|
|
if (scan == fix->fx_addsy)
|
|
break;
|
|
}
|
|
|
|
csect = next_csect;
|
/* If the symbol was not declared by a label (eg: a section symbol),
|
}
|
use the section instead of the csect. This doesn't happen in
|
|
normal AIX assembly code. */
|
|
if (csect == NULL)
|
|
csect = seg_info (symseg)->sym;
|
|
|
fix->fx_offset += val - symbol_get_frag (csect)->fr_address;
|
fix->fx_offset += val - symbol_get_frag (csect)->fr_address;
|
fix->fx_addsy = csect;
|
fix->fx_addsy = csect;
|
}
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/* Adjust a reloc against a .lcomm symbol to be against the base
|
/* Adjust a reloc against a .lcomm symbol to be against the base
|
.lcomm. */
|
.lcomm. */
|
Line 5929... |
Line 5892... |
return 1;
|
return 1;
|
|
|
return generic_force_reloc (fix);
|
return generic_force_reloc (fix);
|
}
|
}
|
|
|
|
void
|
|
ppc_new_dot_label (symbolS *sym)
|
|
{
|
|
/* Anchor this label to the current csect for relocations. */
|
|
symbol_get_tc (sym)->within = ppc_current_csect;
|
|
}
|
|
|
#endif /* OBJ_XCOFF */
|
#endif /* OBJ_XCOFF */
|
|
|
#ifdef OBJ_ELF
|
#ifdef OBJ_ELF
|
/* If this function returns non-zero, it guarantees that a relocation
|
/* If this function returns non-zero, it guarantees that a relocation
|
will be emitted for a fixup. */
|
will be emitted for a fixup. */
|