Module Name: src
Committed By: matt
Date: Sat Sep 5 18:53:13 UTC 2009
Modified Files:
src/libexec/ld.elf_so/arch/mips [matt-nb5-mips64]: mips_reloc.c
Log Message:
Fix some BIG_ENDIAN botches.
To generate a diff of this commit:
cvs rdiff -u -r1.53.10.1 -r1.53.10.2 \
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.53.10.1 src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.53.10.2
--- src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.53.10.1 Sat Sep 5 03:34:25 2009
+++ src/libexec/ld.elf_so/arch/mips/mips_reloc.c Sat Sep 5 18:53:13 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_reloc.c,v 1.53.10.1 2009/09/05 03:34:25 matt Exp $ */
+/* $NetBSD: mips_reloc.c,v 1.53.10.2 2009/09/05 18:53:13 matt Exp $ */
/*
* Copyright 1997 Michael L. Hitch <[email protected]>
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mips_reloc.c,v 1.53.10.1 2009/09/05 03:34:25 matt Exp $");
+__RCSID("$NetBSD: mips_reloc.c,v 1.53.10.2 2009/09/05 18:53:13 matt Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -94,7 +94,7 @@
(void)memcpy(&val, where, len);
#endif
#if BYTE_ORDER == BIG_ENDIAN
- (void)memcpy(&(const uint8_t *)(val+1) - len, where, len);
+ (void)memcpy((uint8_t *)((&val)+1) - len, where, len);
#endif
return (len == sizeof(Elf_Sxword)) ? val : (Elf_Sword)val;
}
@@ -116,7 +116,7 @@
(void)memcpy(where, &val, len);
#endif
#if BYTE_ORDER == BIG_ENDIAN
- (void)memcpy(where, &(const uint8_t *)(val+1) - len, len);
+ (void)memcpy(where, (const uint8_t *)((&val)+1) - len, len);
#endif
}