Module Name: src
Committed By: he
Date: Sun May 24 20:35:41 UTC 2009
Modified Files:
src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c
Log Message:
Apply fix borrowed from i386: Fix const issue (cast const pointers
to "const uint8_t *" instead of "caddr_t").
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/libexec/ld.elf_so/arch/powerpc/ppc_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/powerpc/ppc_reloc.c
diff -u src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.41 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.42
--- src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.41 Thu Jul 24 04:39:25 2008
+++ src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c Sun May 24 20:35:41 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ppc_reloc.c,v 1.41 2008/07/24 04:39:25 matt Exp $ */
+/* $NetBSD: ppc_reloc.c,v 1.42 2009/05/24 20:35:41 he Exp $ */
/*-
* Copyright (C) 1998 Tsubai Masanari
@@ -30,7 +30,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ppc_reloc.c,v 1.41 2008/07/24 04:39:25 matt Exp $");
+__RCSID("$NetBSD: ppc_reloc.c,v 1.42 2009/05/24 20:35:41 he Exp $");
#endif /* not lint */
#include <stdarg.h>
@@ -123,7 +123,7 @@
break;
}
}
- relalim = (const Elf_Rela *)((caddr_t)rela + relasz);
+ relalim = (const Elf_Rela *)((const uint8_t *)rela + relasz);
for (; rela < relalim; rela++) {
where = (Elf_Addr *)(relocbase + rela->r_offset);
*where = (Elf_Addr)(relocbase + rela->r_addend);