Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/aarch64/aarch64 show correct relocation address whe...



details:   https://anonhg.NetBSD.org/src/rev/6039a4b5bfbc
branches:  trunk
changeset: 365523:6039a4b5bfbc
user:      ryo <ryo%NetBSD.org@localhost>
date:      Sun Aug 19 20:02:22 2018 +0000

description:
show correct relocation address when overflowed.

diffstat:

 sys/arch/aarch64/aarch64/kobj_machdep.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r caa416b4b191 -r 6039a4b5bfbc sys/arch/aarch64/aarch64/kobj_machdep.c
--- a/sys/arch/aarch64/aarch64/kobj_machdep.c   Sun Aug 19 15:10:23 2018 +0000
+++ b/sys/arch/aarch64/aarch64/kobj_machdep.c   Sun Aug 19 20:02:22 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kobj_machdep.c,v 1.1 2018/08/15 11:10:45 ryo Exp $     */
+/*     $NetBSD: kobj_machdep.c,v 1.2 2018/08/19 20:02:22 ryo Exp $     */
 
 /*
  * Copyright (c) 2018 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.1 2018/08/15 11:10:45 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.2 2018/08/19 20:02:22 ryo Exp $");
 
 #define ELFSIZE                ARCH_ELFSIZE
 
@@ -260,7 +260,7 @@
                val = val >> 12;
                raddr = val << 12;
                val -= (uintptr_t)where >> 12;
-               if (!nc && checkoverflow(val, 21, val, " x 4k", where, off)) {
+               if (!nc && checkoverflow(val, 21, raddr, " x 4k", where, off)) {
                        error = 1;
                        break;
                }
@@ -284,7 +284,7 @@
                        break;
                }
                val = (intptr_t)val >> 2;
-               if (checkoverflow(val, 26, val, " word", where, off)) {
+               if (checkoverflow(val, 26, raddr, " word", where, off)) {
                        error = 1;
                        break;
                }
@@ -299,7 +299,7 @@
                 */
                raddr = saddr + addend;
                val = raddr - (uintptr_t)where;
-               if (checkoverflow(val, 64, val, "", where, off)) {
+               if (checkoverflow(val, 64, raddr, "", where, off)) {
                        error = 1;
                        break;
                }
@@ -312,7 +312,7 @@
                 */
                raddr = saddr + addend;
                val = raddr - (uintptr_t)where;
-               if (checkoverflow(val, 32, val, "", where, off)) {
+               if (checkoverflow(val, 32, raddr, "", where, off)) {
                        error = 1;
                        break;
                }
@@ -325,7 +325,7 @@
                 */
                raddr = saddr + addend;
                val = raddr - (uintptr_t)where;
-               if (checkoverflow(val, 16, val, "", where, off)) {
+               if (checkoverflow(val, 16, raddr, "", where, off)) {
                        error = 1;
                        break;
                }



Home | Main Index | Thread Index | Old Index