Module Name: src Committed By: matt Date: Fri Sep 24 15:20:52 UTC 2010
Modified Files: src/libexec/ld.elf_so/arch/mips: mips_reloc.c Log Message: Make the GOT1_MASK 64-bit clean. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/libexec/ld.elf_so/arch/mips/mips_reloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/libexec/ld.elf_so/arch/mips/mips_reloc.c diff -u src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.59 src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.60 --- src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.59 Fri Aug 6 16:33:18 2010 +++ src/libexec/ld.elf_so/arch/mips/mips_reloc.c Fri Sep 24 15:20:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_reloc.c,v 1.59 2010/08/06 16:33:18 joerg Exp $ */ +/* $NetBSD: mips_reloc.c,v 1.60 2010/09/24 15:20:52 matt Exp $ */ /* * Copyright 1997 Michael L. Hitch <mhi...@montana.edu> @@ -30,7 +30,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: mips_reloc.c,v 1.59 2010/08/06 16:33:18 joerg Exp $"); +__RCSID("$NetBSD: mips_reloc.c,v 1.60 2010/09/24 15:20:52 matt Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -74,6 +74,7 @@ #define ELF_R_NXTTYPE_64_P(r_type) (0) #define Elf_Sxword Elf32_Sword #endif +#define GOT1_MASK (~(Elf_Addr)0 >> 1) static inline Elf_Sxword load_ptr(void *where, size_t len) @@ -426,7 +427,7 @@ _rtld_bind(Elf_Word a0, Elf_Addr a1, Elf_Addr a2, Elf_Addr a3) { Elf_Addr *got = (Elf_Addr *)(a2 - 0x7ff0); - const Obj_Entry *obj = (Obj_Entry *)(got[1] & 0x7fffffff); + const Obj_Entry *obj = (Obj_Entry *)(got[1] & GOT1_MASK); Elf_Addr new_value = 0; /* XXX gcc */ int err;