Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/build: Use the single-argument OUTPUT_FORMAT() linker script command

The various x86 linker scripts use the three-argument linker script
command variant OUTPUT_FORMAT(DEFAULT, BIG, LITTLE) which specifies
three object file formats when the -EL and -EB linker command line
options are used. When -EB is specified, OUTPUT_FORMAT issues the BIG
object file format, when -EL, LITTLE, respectively, and when neither is
specified, DEFAULT.

However, those -E[LB] options are not used by arch/x86/ so switch to the
simple OUTPUT_FORMAT(BFDNAME) macro variant.

No functional changes.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Link: https://lkml.kernel.org/r/20190109181531.27513-1-bp@alien8.de

+4 -4
+1 -1
arch/x86/boot/compressed/vmlinux.lds.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 #include <asm-generic/vmlinux.lds.h> 3 3 4 - OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) 4 + OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT) 5 5 6 6 #undef i386 7 7
+1 -1
arch/x86/boot/setup.ld
··· 3 3 * 4 4 * Linker script for the i386 setup code 5 5 */ 6 - OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 6 + OUTPUT_FORMAT("elf32-i386") 7 7 OUTPUT_ARCH(i386) 8 8 ENTRY(_start) 9 9
+1 -1
arch/x86/kernel/vmlinux.lds.S
··· 31 31 32 32 #undef i386 /* in case the preprocessor is a 32bit one */ 33 33 34 - OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) 34 + OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT) 35 35 36 36 #ifdef CONFIG_X86_32 37 37 OUTPUT_ARCH(i386)
+1 -1
arch/x86/realmode/rm/realmode.lds.S
··· 9 9 10 10 #undef i386 11 11 12 - OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") 12 + OUTPUT_FORMAT("elf32-i386") 13 13 OUTPUT_ARCH(i386) 14 14 15 15 SECTIONS