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/mips don't forget to eat the high bits.



details:   https://anonhg.NetBSD.org/src/rev/b458e2424fb6
branches:  trunk
changeset: 829153:b458e2424fb6
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 19 23:17:41 2018 +0000

description:
don't forget to eat the high bits.

diffstat:

 libexec/ld.elf_so/arch/mips/mips_reloc.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r f4ca0cc77b04 -r b458e2424fb6 libexec/ld.elf_so/arch/mips/mips_reloc.c
--- a/libexec/ld.elf_so/arch/mips/mips_reloc.c  Fri Jan 19 15:04:29 2018 +0000
+++ b/libexec/ld.elf_so/arch/mips/mips_reloc.c  Fri Jan 19 23:17:41 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_reloc.c,v 1.71 2017/12/25 05:29:27 maya Exp $     */
+/*     $NetBSD: mips_reloc.c,v 1.72 2018/01/19 23:17:41 christos Exp $ */
 
 /*
  * Copyright 1997 Michael L. Hitch <mhitch%montana.edu@localhost>
@@ -30,7 +30,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: mips_reloc.c,v 1.71 2017/12/25 05:29:27 maya Exp $");
+__RCSID("$NetBSD: mips_reloc.c,v 1.72 2018/01/19 23:17:41 christos Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -319,7 +319,7 @@
 
                where = obj->relocbase + rel->r_offset;
 
-               switch (ELF_R_TYPE(rel->r_info)) {
+               switch (ELF_R_TYPE(rel->r_info) & 0xff) {
 #if ELFSIZE == 64
                case R_TYPE(TLS_DTPMOD64):
                case R_TYPE(TLS_DTPREL64):
@@ -342,7 +342,7 @@
                        break;
                }
 
-               switch (ELF_R_TYPE(rel->r_info)) {
+               switch (ELF_R_TYPE(rel->r_info) & 0xff) {
                case R_TYPE(NONE):
                        break;
 



Home | Main Index | Thread Index | Old Index