Add back symnum, fix debug print.

This commit is contained in:
joerg 2017-06-20 15:02:54 +00:00
parent af8b71f9de
commit 152a0d21c4
1 changed files with 5 additions and 5 deletions

View File

@ -1,8 +1,8 @@
/* $NetBSD: mdreloc.c,v 1.32 2017/06/19 11:57:02 joerg Exp $ */
/* $NetBSD: mdreloc.c,v 1.33 2017/06/20 15:02:54 joerg Exp $ */
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mdreloc.c,v 1.32 2017/06/19 11:57:02 joerg Exp $");
__RCSID("$NetBSD: mdreloc.c,v 1.33 2017/06/20 15:02:54 joerg Exp $");
#endif /* not lint */
#include <sys/types.h>
@ -58,6 +58,7 @@ _rtld_relocate_nonplt_objects(Obj_Entry *obj)
for (rela = obj->rela; rela < obj->relalim; rela++) {
Elf_Addr *where;
Elf_Addr tmp;
unsigned long symnum;
where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
@ -120,12 +121,11 @@ _rtld_relocate_nonplt_objects(Obj_Entry *obj)
default:
rdbg(("sym = %lu, type = %lu, offset = %p, "
"addend = %p, contents = %p, symbol = %s",
"addend = %p, contents = %p",
(u_long)ELF_R_SYM(rela->r_info),
(u_long)ELF_R_TYPE(rela->r_info),
(void *)rela->r_offset, (void *)rela->r_addend,
(void *)*where,
obj->strtab + obj->symtab[symnum].st_name));
(void *)*where));
_rtld_error("%s: Unsupported relocation type %ld "
"in non-PLT relocations",
obj->path, (u_long) ELF_R_TYPE(rela->r_info));