Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/sh3 Fix previous. P is the final (relocated) a...



details:   https://anonhg.NetBSD.org/src/rev/7c40db99384c
branches:  trunk
changeset: 998143:7c40db99384c
user:      uwe <uwe%NetBSD.org@localhost>
date:      Tue Apr 09 00:36:55 2019 +0000

description:
Fix previous.  P is the final (relocated) address not just the offset.

diffstat:

 sys/arch/sh3/sh3/kobj_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 633bfe8babeb -r 7c40db99384c sys/arch/sh3/sh3/kobj_machdep.c
--- a/sys/arch/sh3/sh3/kobj_machdep.c   Tue Apr 09 00:16:30 2019 +0000
+++ b/sys/arch/sh3/sh3/kobj_machdep.c   Tue Apr 09 00:36:55 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kobj_machdep.c,v 1.6 2019/04/09 00:16:30 uwe Exp $     */
+/*     $NetBSD: kobj_machdep.c,v 1.7 2019/04/09 00:36:55 uwe Exp $     */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.6 2019/04/09 00:16:30 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.7 2019/04/09 00:36:55 uwe Exp $");
 
 #define        ELFSIZE         ARCH_ELFSIZE
 
@@ -71,7 +71,7 @@
 
                tmp = (Elf_Addr)(addr + *where + rela->r_addend);
                if (rtype == R_TYPE(REL32))
-                       tmp -= rela->r_offset;
+                       tmp -= (uintptr_t)where;
                *where = tmp;
                break;
 



Home | Main Index | Thread Index | Old Index