]> git.baikalelectronics.ru Git - kernel.git/commit
x86/build: Build compressed x86 kernels as PIE when !CONFIG_RELOCATABLE as well
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 18 Nov 2016 21:07:19 +0000 (13:07 -0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 21 Nov 2016 10:05:28 +0000 (11:05 +0100)
commit00cf3d9b4214e03b3553dfc7912c7784003beb2b
tree0660db535f0c49ebe8e0e56ac7e67a4d92d91fd2
parent7b75ada59b2988fc15e0faba096fd1f4cbde70e2
x86/build: Build compressed x86 kernels as PIE when !CONFIG_RELOCATABLE as well

Since the bootloader may load the compressed x86 kernel at any address,
it should always be built as PIE, not just when CONFIG_RELOCATABLE=y.

Otherwise, linker in binutils 2.27 will optimize GOT load into the
absolute address when building the compressed x86 kernel as a non-PIE
executable.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
[ Small wording changes. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/compressed/Makefile