before checking sy_mri_common.
(fixup_segment): Likewise.
* config/obj-coff.c (fixup_segment): Likewise.
add_number = fixP->fx_offset;
pcrel = fixP->fx_pcrel;
- if (add_symbolP->sy_mri_common)
+ if (add_symbolP != NULL
+ && add_symbolP->sy_mri_common)
{
know (add_symbolP->sy_value.X_op == O_symbol);
add_number += S_GET_VALUE (add_symbolP);
sym = fixp->fx_addsy;
symsec = sym->bsym->section;
- if (sym->sy_mri_common)
+ if (sym != NULL && sym->sy_mri_common)
{
/* These symbols are handled specially in fixup_segment. */
goto done;
pcrel = fixP->fx_pcrel;
plt = fixP->fx_plt;
- if (add_symbolP->sy_mri_common)
+ if (add_symbolP != NULL
+ && add_symbolP->sy_mri_common)
{
know (add_symbolP->sy_value.X_op == O_symbol);
add_number += S_GET_VALUE (add_symbolP);