x86: Skip undefined symbol when finishing DT_RELR

Don't abort for undefined symbol when finishing DT_RELR.  Instead, skip
undefined symbol.  Undefined symbol will be reported by relocate_section.

	* elfxx-x86.c (elf_x86_size_or_finish_relative_reloc): Skip
	undefined symbol in finishing phase.
This commit is contained in:
H.J. Lu 2022-02-05 07:26:31 -08:00
parent 0acf434a23
commit a9e61227c0

View File

@ -1484,11 +1484,13 @@ elf_x86_size_or_finish_relative_reloc
}
else
{
/* Allow undefined symbol only at the sizing phase. */
/* Allow undefined symbol only at the sizing phase.
Otherwise skip undefined symbol here. Undefined
symbol will be reported by relocate_section. */
if (outrel == NULL)
relocation = 0;
else
abort ();
continue;
}
}
else