x86, relocs: Move ELF relocation handling to C
authorKees Cook <keescook@chromium.org>
Mon, 8 Jul 2013 16:15:17 +0000 (09:15 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 8 Aug 2013 04:00:04 +0000 (21:00 -0700)
commita02150610776f66b40257624822a879311592bb2
treea14370b350bfead0b692d2b6a4b74f426c17024d
parentc095ba7224d8edc71dcef0d655911399a8bd4a3f
x86, relocs: Move ELF relocation handling to C

Moves the relocation handling into C, after decompression. This requires
that the decompressed size is passed to the decompression routine as
well so that relocations can be found. Only kernels that need relocation
support will use the code (currently just x86_32), but this is laying
the ground work for 64-bit using it in support of KASLR.

Based on work by Neill Clift and Michael Davidson.

Signed-off-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/20130708161517.GA4832@www.outflux.net
Acked-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/Kconfig
arch/x86/Makefile
arch/x86/boot/compressed/head_32.S
arch/x86/boot/compressed/head_64.S
arch/x86/boot/compressed/misc.c
arch/x86/include/asm/page_32_types.h
arch/x86/include/asm/page_64_types.h
arch/x86/include/asm/page_types.h