From ddeaaf811fb12954fdd4a93460cd37db76ef72e6 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 20 Jun 2017 13:45:20 +0000 Subject: [PATCH] Add last_symnum, move up def and defobj. --- libexec/ld.elf_so/arch/sh3/mdreloc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libexec/ld.elf_so/arch/sh3/mdreloc.c b/libexec/ld.elf_so/arch/sh3/mdreloc.c index 6aaf435fb0ee..9b21e2825bf5 100644 --- a/libexec/ld.elf_so/arch/sh3/mdreloc.c +++ b/libexec/ld.elf_so/arch/sh3/mdreloc.c @@ -1,8 +1,8 @@ -/* $NetBSD: mdreloc.c,v 1.33 2017/06/19 11:57:02 joerg Exp $ */ +/* $NetBSD: mdreloc.c,v 1.34 2017/06/20 13:45:20 joerg Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.33 2017/06/19 11:57:02 joerg Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.34 2017/06/20 13:45:20 joerg Exp $"); #endif /* not lint */ #include @@ -52,11 +52,12 @@ int _rtld_relocate_nonplt_objects(Obj_Entry *obj) { const Elf_Rela *rela; + const Elf_Sym *def = NULL; + const Obj_Entry *defobj = NULL; + unsigned long last_symnum = ULONG_MAX; for (rela = obj->rela; rela < obj->relalim; rela++) { Elf_Addr *where; - const Elf_Sym *def; - const Obj_Entry *defobj; Elf_Addr tmp; unsigned long symnum;