Testing for NULL in pic_need_relax fixes the other call to this
function in md_estimate_size_before_relax.
PR 28955
* config/tc-mips.c (mips_frob_file): Move NULL sym test to..
(pic_need_relax): ..here.
there isn't supposed to be a matching LO. Ignore %gots against
constants; we'll report an error for those later. */
if (got16_reloc_p (l->fixp->fx_r_type)
- && !(l->fixp->fx_addsy
- && pic_need_relax (l->fixp->fx_addsy)))
+ && !pic_need_relax (l->fixp->fx_addsy))
continue;
/* Check quickly whether the next fixup happens to be a matching %lo. */
{
asection *symsec;
+ if (!sym)
+ return false;
+
/* Handle the case of a symbol equated to another symbol. */
while (symbol_equated_reloc_p (sym))
{