Return an error if a symbol is not found in reloc_jmpslots() instead of

crashing.
This commit is contained in:
Thomas Moestl 2002-09-14 12:14:24 +00:00
parent 06be2aaa83
commit a4823075e5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103315

View File

@ -455,6 +455,8 @@ reloc_jmpslots(Obj_Entry *obj)
where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj,
true, NULL);
if (def == NULL)
return -1;
target = (Elf_Addr)(defobj->relocbase + def->st_value);
reloc_jmpslot(where, target, defobj);
}