The two-stage cast is because we really do want a 32bit integer value from a 64bit pointer, and gcc assumes that we're making a mistake if there is just one cast. # powerpc64-unknown-linux-gnu-gcc --version powerpc64-unknown-linux-gnu-gcc (GCC) 4.1.1 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # make kexec/arch/ppc64/kexec-elf-rel-ppc64.c: In function 'machine_apply_elf_rel': kexec/arch/ppc64/kexec-elf-rel-ppc64.c:66: warning: cast from pointer to integer of different size Signed-off-by: Simon Horman Index: kexec-tools/kexec/arch/ppc64/kexec-elf-rel-ppc64.c =================================================================== --- kexec-tools.orig/kexec/arch/ppc64/kexec-elf-rel-ppc64.c 2010-02-01 23:06:38.000000000 +1100 +++ kexec-tools/kexec/arch/ppc64/kexec-elf-rel-ppc64.c 2010-02-01 23:07:21.000000000 +1100 @@ -63,7 +63,7 @@ void machine_apply_elf_rel(struct mem_eh break; case R_PPC64_REL32: - *(uint32_t *)location = value - (uint32_t)location; + *(uint32_t *)location = value - (uint32_t)(uint64_t)location; break; case R_PPC64_TOC: