Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so/arch/riscv r_symndx is no longer declared, ...



details:   https://anonhg.NetBSD.org/src/rev/0dfcf4a3b89a
branches:  trunk
changeset: 450472:0dfcf4a3b89a
user:      maya <maya%NetBSD.org@localhost>
date:      Mon Apr 15 19:13:03 2019 +0000

description:
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:

 libexec/ld.elf_so/arch/riscv/mdreloc.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 28d2ab01093d -r 0dfcf4a3b89a libexec/ld.elf_so/arch/riscv/mdreloc.c
--- a/libexec/ld.elf_so/arch/riscv/mdreloc.c    Mon Apr 15 18:49:07 2019 +0000
+++ b/libexec/ld.elf_so/arch/riscv/mdreloc.c    Mon Apr 15 19:13:03 2019 +0000
@@ -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 @@
                        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;
 



Home | Main Index | Thread Index | Old Index