}
ret = riscv_resolve_pcrel_lo_relocs (&pcrel_relocs);
-out:
+ out:
riscv_free_pcrel_relocs (&pcrel_relocs);
return ret;
}
return TRUE;
-fail:
+ fail:
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
symval = 0;
sym_sec = bfd_und_section_ptr;
}
- else if (h->root.u.def.section->output_section == NULL
- || (h->root.type != bfd_link_hash_defined
- && h->root.type != bfd_link_hash_defweak))
- continue;
- else
+ else if ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->root.u.def.section != NULL
+ && h->root.u.def.section->output_section != NULL)
{
symval = h->root.u.def.value;
sym_sec = h->root.u.def.section;
}
+ else
+ continue;
if (h->type != STT_FUNC)
reserve_size =
ret = TRUE;
-fail:
+ fail:
if (relocs != data->relocs)
free (relocs);
riscv_free_pcgp_relocs(&pcgp_relocs, abfd, sec);