aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/config/obj-coff.c3
-rw-r--r--gas/write.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index b48900b..a5c04d2 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -3641,7 +3641,8 @@ fixup_segment (segP, this_segment_type)
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);
diff --git a/gas/write.c b/gas/write.c
index f9ec214..ae7d8ee 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -630,7 +630,7 @@ adjust_reloc_syms (abfd, sec, xxx)
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;
@@ -2169,7 +2169,8 @@ fixup_segment (fixP, this_segment_type)
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);