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/sparc64 Fix thinko in previous: even ...



details:   https://anonhg.NetBSD.org/src/rev/007a731a7006
branches:  trunk
changeset: 825589:007a731a7006
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Jul 24 08:08:34 2017 +0000

description:
Fix thinko in previous: even if the address is an unsigned value and we
have verified the range before, we still need to mask the bit pattern
to the target instruction field.

diffstat:

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

diffs (27 lines):

diff -r 484de90d400e -r 007a731a7006 libexec/ld.elf_so/arch/sparc64/mdreloc.c
--- a/libexec/ld.elf_so/arch/sparc64/mdreloc.c  Mon Jul 24 02:07:43 2017 +0000
+++ b/libexec/ld.elf_so/arch/sparc64/mdreloc.c  Mon Jul 24 08:08:34 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mdreloc.c,v 1.62 2017/07/23 14:37:51 martin Exp $      */
+/*     $NetBSD: mdreloc.c,v 1.63 2017/07/24 08:08:34 martin Exp $      */
 
 /*-
  * Copyright (c) 2000 Eduardo Horvath.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.62 2017/07/23 14:37:51 martin Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.63 2017/07/24 08:08:34 martin Exp $");
 #endif /* not lint */
 
 #include <errno.h>
@@ -651,7 +651,7 @@
                 *      nop
                 *
                 */
-               where[1] = BAA | (offBAA >> 2);
+               where[1] = BAA | ((offBAA >> 2) & 0x7ffff);
                __asm volatile("iflush %0+4" : : "r" (where));
        } else if (value < (1L<<32)) {
                /* 



Home | Main Index | Thread Index | Old Index