mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 06:57:04 +07:00
Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 build updates from Ingo Molnar: "Misc cleanups and a retpoline code generation optimization" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, retpolines: Raise limit for generating indirect calls from switch-case x86/build: Use the single-argument OUTPUT_FORMAT() linker script command x86/build: Specify elf_i386 linker emulation explicitly for i386 objects x86/build: Mark per-CPU symbols as absolute explicitly for LLD
This commit is contained in:
commit
f14b5f05cd
@ -217,6 +217,11 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
|
||||
# Avoid indirect branches in kernel to deal with Spectre
|
||||
ifdef CONFIG_RETPOLINE
|
||||
KBUILD_CFLAGS += $(RETPOLINE_CFLAGS)
|
||||
# Additionally, avoid generating expensive indirect jumps which
|
||||
# are subject to retpolines for small number of switch cases.
|
||||
# clang turns off jump table generation by default when under
|
||||
# retpoline builds, however, gcc does not for x86.
|
||||
KBUILD_CFLAGS += $(call cc-option,--param=case-values-threshold=20)
|
||||
endif
|
||||
|
||||
archscripts: scripts_basic
|
||||
|
@ -100,7 +100,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
|
||||
AFLAGS_header.o += -I$(objtree)/$(obj)
|
||||
$(obj)/header.o: $(obj)/zoffset.h
|
||||
|
||||
LDFLAGS_setup.elf := -T
|
||||
LDFLAGS_setup.elf := -m elf_i386 -T
|
||||
$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#include <asm-generic/vmlinux.lds.h>
|
||||
|
||||
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
|
||||
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT)
|
||||
|
||||
#undef i386
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Linker script for the i386 setup code
|
||||
*/
|
||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
||||
OUTPUT_FORMAT("elf32-i386")
|
||||
OUTPUT_ARCH(i386)
|
||||
ENTRY(_start)
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#undef i386 /* in case the preprocessor is a 32bit one */
|
||||
|
||||
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
|
||||
OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT)
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
OUTPUT_ARCH(i386)
|
||||
@ -401,7 +401,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);
|
||||
|
||||
|
@ -47,7 +47,7 @@ $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE
|
||||
targets += realmode.lds
|
||||
$(obj)/realmode.lds: $(obj)/pasyms.h
|
||||
|
||||
LDFLAGS_realmode.elf := --emit-relocs -T
|
||||
LDFLAGS_realmode.elf := -m elf_i386 --emit-relocs -T
|
||||
CPPFLAGS_realmode.lds += -P -C -I$(objtree)/$(obj)
|
||||
|
||||
targets += realmode.elf
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#undef i386
|
||||
|
||||
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
|
||||
OUTPUT_FORMAT("elf32-i386")
|
||||
OUTPUT_ARCH(i386)
|
||||
|
||||
SECTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user