Module Name: src
Committed By: uwe
Date: Tue Apr 9 00:36:55 UTC 2019
Modified Files:
src/sys/arch/sh3/sh3: kobj_machdep.c
Log Message:
Fix previous. P is the final (relocated) address not just the offset.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sh3/sh3/kobj_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sh3/sh3/kobj_machdep.c
diff -u src/sys/arch/sh3/sh3/kobj_machdep.c:1.6 src/sys/arch/sh3/sh3/kobj_machdep.c:1.7
--- src/sys/arch/sh3/sh3/kobj_machdep.c:1.6 Tue Apr 9 00:16:30 2019
+++ src/sys/arch/sh3/sh3/kobj_machdep.c Tue Apr 9 00:36:55 2019
@@ -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 @@ kobj_reloc(kobj_t ko, uintptr_t relocbas
tmp = (Elf_Addr)(addr + *where + rela->r_addend);
if (rtype == R_TYPE(REL32))
- tmp -= rela->r_offset;
+ tmp -= (uintptr_t)where;
*where = tmp;
break;