[lkml]   [2019]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] x86/boot/compressed/64: Define __force_order only when CONFIG_RANDOMIZE_BASE is unset
kaslr_64.c also defines the same variable, however when both files are
included into final link, linker complains about multiple definition of
`__force_order' which is coming from kaslr_64.o and pgtable_64.o, its
possible that kaslr_64.o is disabled via CONFIG_RANDOMIZE_BASE config
option, therefore define it conditionally only when

Since arch/x86/boot/compressed/Makefile overrides global CFLAGS it loses
-fno-common option which would have caught this

Signed-off-by: Khem Raj <>
Cc: Kirill A. Shutemov <>
Cc: Kees Cook <>
Cc: "H. Peter Anvin" <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Cc: x86-ml <>
Cc: Arnd Bergmann <>
arch/x86/boot/compressed/pgtable_64.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/x86/boot/compressed/pgtable_64.c b/arch/x86/boot/compressed/pgtable_64.c
index c8862696a47b..077d19268b0b 100644
--- a/arch/x86/boot/compressed/pgtable_64.c
+++ b/arch/x86/boot/compressed/pgtable_64.c
@@ -12,7 +12,9 @@
* It is not referenced from the code, but GCC < 5 with -fPIE would fail
* due to an undefined symbol. Define it to make these ancient GCCs work.
unsigned long __force_order;

#define BIOS_START_MIN 0x20000U /* 128K, less than this is insane */
#define BIOS_START_MAX 0x9f000U /* 640K, absolute maximum */
 \ /
  Last update: 2019-12-21 16:19    [W:0.097 / U:3.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site