PR28264, ld.bfd crash on linking efivar with LTO

PR 28264
	PR 26978
	* linker.c (_bfd_generic_link_add_one_symbol <MIND>): Check
	that string is non-NULL.
This commit is contained in:
Alan Modra
2021-08-26 12:19:35 +09:30
parent bfc25dcdad
commit b05929a20e

View File

@ -1682,7 +1682,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
cycle = true;
break;
}
if (strcmp (h->u.i.link->root.string, string) == 0)
if (string != NULL && strcmp (h->u.i.link->root.string, string) == 0)
break;
/* Fall through. */
case MDEF: