Skip to content

Commit 819275e

Browse files
petrpavluAlexander Gordeev
authored andcommitted
s390/boot: Use -D__DISABLE_EXPORTS
Files in the arch/s390/boot directory reuse logic from the rest of the kernel by including certain C and assembly files from the kernel and lib directories. Some of these included files contain EXPORT_SYMBOL directives. For instance, arch/s390/boot/cmdline.c includes lib/cmdline.c, which exports the get_option() function. This inclusion triggers genksyms processing for the files in arch/s390/boot, which is unnecessary and slows down the build. Additionally, when KBUILD_SYMTYPES=1 is set, the generated symtypes data contain exported symbols that are duplicated with the main kernel. This duplication can confuse external kABI tools that process the symtypes data. Address this issue by compiling the files in arch/s390/boot with -D__DISABLE_EXPORTS. Signed-off-by: Petr Pavlu <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexander Gordeev <[email protected]>
1 parent d7f8ffd commit 819275e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/boot/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ CC_FLAGS_MARCH_MINIMUM := -march=z10
1919

2020
KBUILD_AFLAGS := $(filter-out $(CC_FLAGS_MARCH),$(KBUILD_AFLAGS_DECOMPRESSOR))
2121
KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_MARCH),$(KBUILD_CFLAGS_DECOMPRESSOR))
22-
KBUILD_AFLAGS += $(CC_FLAGS_MARCH_MINIMUM)
23-
KBUILD_CFLAGS += $(CC_FLAGS_MARCH_MINIMUM)
22+
KBUILD_AFLAGS += $(CC_FLAGS_MARCH_MINIMUM) -D__DISABLE_EXPORTS
23+
KBUILD_CFLAGS += $(CC_FLAGS_MARCH_MINIMUM) -D__DISABLE_EXPORTS
2424

2525
CFLAGS_sclp_early_core.o += -I$(srctree)/drivers/s390/char
2626

0 commit comments

Comments
 (0)