summaryrefslogtreecommitdiff
path: root/arch/arm/boot/compressed
diff options
context:
space:
mode:
authorJonathan Austin <Jonathan.Austin@arm.com>2013-03-04 15:17:36 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-03-06 23:45:42 +0000
commitb8083f86e8e9b23ad4d75d334c92b601947dfa91 (patch)
tree5bdf85b31f631837afa1b35e9706789871fdd9c7 /arch/arm/boot/compressed
parent3f7d1fe108dbaefd0c57a41753fc2c90b395f458 (diff)
downloadlinux-3.10-b8083f86e8e9b23ad4d75d334c92b601947dfa91.tar.gz
linux-3.10-b8083f86e8e9b23ad4d75d334c92b601947dfa91.tar.bz2
linux-3.10-b8083f86e8e9b23ad4d75d334c92b601947dfa91.zip
ARM: 7666/1: decompressor: add -mno-single-pic-base for building the decompressor
Before jumping to (position independent) C-code from the decompressor's assembler world we set-up the C environment. This setup currently does not set r9, which for arm-none-uclinux-uclibceabi toolchains is by default expected to be the PIC offset base register (IE should point to the beginning of the GOT). Currently, therefore, in order to build working kernels that use the decompressor it is necessary to use an arm-linux-gnueabi toolchain, or similar. uClinux toolchains cause a prefetch abort to occur at the beginning of the decompress_kernel function. This patch allows uClinux toolchains to build bootable zImages by forcing the -mno-single-pic-base option, which ensures that the location of the GOT is re-derived each time it is required, and r9 becomes free for use as a general purpose register. This has a small (4% in instruction terms) advantage over the alternative of setting r9 to point to the GOT before calling into the C-world. Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/boot/compressed')
-rw-r--r--arch/arm/boot/compressed/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 5cad8a6dadb..afed28e37ea 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -120,7 +120,7 @@ ORIG_CFLAGS := $(KBUILD_CFLAGS)
KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
endif
-ccflags-y := -fpic -fno-builtin -I$(obj)
+ccflags-y := -fpic -mno-single-pic-base -fno-builtin -I$(obj)
asflags-y := -Wa,-march=all -DZIMAGE
# Supply kernel BSS size to the decompressor via a linker symbol.