diff options
| author | maya <maya@NetBSD.org> | 2019-04-15 19:13:03 +0000 |
|---|---|---|
| committer | maya <maya@NetBSD.org> | 2019-04-15 19:13:03 +0000 |
| commit | 208dc042b074094afed4579c014f61a62291f4c8 (patch) | |
| tree | b9aac76e346e446a121b352e146fa6988da5a5a0 /libexec | |
| parent | ebbc1ed25df9920412bc31989624f89b83024649 (diff) | |
r_symndx is no longer declared, use symnum and initialize it before use.
Completes the changes in the commit:
"Replace COMBREL with just-in-time check in _rtld_relocate_nonplt_objects."
http://mail-index.netbsd.org/source-changes/2017/06/19/msg085496.html
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/ld.elf_so/arch/riscv/mdreloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/ld.elf_so/arch/riscv/mdreloc.c b/libexec/ld.elf_so/arch/riscv/mdreloc.c index da06da4ae0f..80038546a2f 100644 --- a/libexec/ld.elf_so/arch/riscv/mdreloc.c +++ b/libexec/ld.elf_so/arch/riscv/mdreloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.4 2017/08/10 19:03:26 joerg Exp $ */ +/* $NetBSD: mdreloc.c,v 1.5 2019/04/15 19:13:03 maya Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.4 2017/08/10 19:03:26 joerg Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.5 2019/04/15 19:13:03 maya Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -131,7 +131,8 @@ _rtld_relocate_nonplt_objects(Obj_Entry *obj) break; case R_TYPE(RELATIVE): { - def = obj->symtab + r_symndx; + symnum = ELF_R_SYM(rela->r_info); + def = obj->symtab + symnum; Elf_Addr val = (Elf_Addr)obj->relocbase + rela->r_addend; |
