Verify that the symbols are of the right kind when applying fixup
to segment data. This prevens gas from SEGV when seeing code of the type L0: addl $(Loop-L0-3),%eax Loop: This solves PR 6486 from Anders Hjalmarsson.
This commit is contained in:
parent
f274a1c1c5
commit
38a6811363
1
gnu/dist/gas/config/tc-i386.c
vendored
1
gnu/dist/gas/config/tc-i386.c
vendored
@ -2733,6 +2733,7 @@ md_apply_fix3 (fixP, valp, seg)
|
|||||||
}
|
}
|
||||||
else if ((fixP->fx_r_type == BFD_RELOC_32)
|
else if ((fixP->fx_r_type == BFD_RELOC_32)
|
||||||
&& aout_pic_flag
|
&& aout_pic_flag
|
||||||
|
&& (fixP->fx_addsy != NULL)
|
||||||
&& ((fixP->fx_addsy->bsym->flags & BSF_GLOBAL) != 0))
|
&& ((fixP->fx_addsy->bsym->flags & BSF_GLOBAL) != 0))
|
||||||
{
|
{
|
||||||
if (!bfd_is_com_section(bfd_get_section(fixP->fx_addsy->bsym)))
|
if (!bfd_is_com_section(bfd_get_section(fixP->fx_addsy->bsym)))
|
||||||
|
Loading…
Reference in New Issue
Block a user