Created
October 23, 2018 05:48
-
-
Save fcicq/e32dd41b0b5c197237ca084584e6b871 to your computer and use it in GitHub Desktop.
fix ld.lld: error: ./arch/x86/kernel/vmlinux.lds:342: at least one side of the expression must be absolute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S | |
index f05f00acac89..7fe2ee55c713 100644 | |
--- a/arch/x86/kernel/vmlinux.lds.S | |
+++ b/arch/x86/kernel/vmlinux.lds.S | |
@@ -364,7 +364,7 @@ SECTIONS | |
* Per-cpu symbols which need to be offset from __per_cpu_load | |
* for the boot processor. | |
*/ | |
-#define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load | |
+#define INIT_PER_CPU(x) init_per_cpu__##x = ABSOLUTE(x) + __per_cpu_load | |
INIT_PER_CPU(gdt_page); | |
INIT_PER_CPU(irq_stack_union); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see also https://lore.kernel.org/patchwork/patch/956582/ for arm64