* [PATCH] s390/purgatory: Use -D__DISABLE_EXPORTS
@ 2025-02-13 21:16 Sami Tolvanen
2025-02-17 18:25 ` Vasily Gorbik
0 siblings, 1 reply; 2+ messages in thread
From: Sami Tolvanen @ 2025-02-13 21:16 UTC (permalink / raw)
To: Masahiro Yamada, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle
Cc: Sami Tolvanen, kernel test robot, linux-s390, linux-kernel
The object files in purgatory do not export symbols, so disable exports
for all the object files, not only sha256.o, with -D__DISABLE_EXPORTS.
This fixes a build failure with CONFIG_GENDWARFKSYMS, where we would
otherwise attempt to calculate symbol versions for purgatory objects and
fail because they're not built with debugging information:
error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
make[5]: *** [../scripts/Makefile.build:207: arch/s390/purgatory/string.o] Error 1
make[5]: *** Deleting file 'arch/s390/purgatory/string.o'
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502120752.U3fOKScQ-lkp@intel.com/
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
---
arch/s390/purgatory/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index bdcf2a3b6c41..bd39b36e7bd6 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -8,7 +8,7 @@ PURGATORY_OBJS = $(addprefix $(obj)/,$(purgatory-y))
$(obj)/sha256.o: $(srctree)/lib/crypto/sha256.c FORCE
$(call if_changed_rule,cc_o_c)
-CFLAGS_sha256.o := -D__DISABLE_EXPORTS -D__NO_FORTIFY
+CFLAGS_sha256.o := -D__NO_FORTIFY
$(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE
$(call if_changed_rule,as_o_S)
@@ -19,9 +19,11 @@ KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common
KBUILD_CFLAGS += -fno-stack-protector
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
+KBUILD_CFLAGS += -D__DISABLE_EXPORTS
KBUILD_CFLAGS += $(CLANG_FLAGS)
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
+KBUILD_AFLAGS += -D__DISABLE_EXPORTS
# Since we link purgatory with -r unresolved symbols are not checked, so we
# also link a purgatory.chk binary without -r to check for unresolved symbols.
base-commit: 4dc1d1bec89864d8076e5ab314f86f46442bfb02
--
2.48.1.601.g30ceb7b040-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] s390/purgatory: Use -D__DISABLE_EXPORTS
2025-02-13 21:16 [PATCH] s390/purgatory: Use -D__DISABLE_EXPORTS Sami Tolvanen
@ 2025-02-17 18:25 ` Vasily Gorbik
0 siblings, 0 replies; 2+ messages in thread
From: Vasily Gorbik @ 2025-02-17 18:25 UTC (permalink / raw)
To: Sami Tolvanen
Cc: Masahiro Yamada, Heiko Carstens, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, kernel test robot,
linux-s390, linux-kernel
On Thu, Feb 13, 2025 at 09:16:14PM +0000, Sami Tolvanen wrote:
> The object files in purgatory do not export symbols, so disable exports
> for all the object files, not only sha256.o, with -D__DISABLE_EXPORTS.
>
> This fixes a build failure with CONFIG_GENDWARFKSYMS, where we would
> otherwise attempt to calculate symbol versions for purgatory objects and
> fail because they're not built with debugging information:
>
> error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
> make[5]: *** [../scripts/Makefile.build:207: arch/s390/purgatory/string.o] Error 1
> make[5]: *** Deleting file 'arch/s390/purgatory/string.o'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202502120752.U3fOKScQ-lkp@intel.com/
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
> ---
> arch/s390/purgatory/Makefile | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Applied, thank you!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-17 18:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 21:16 [PATCH] s390/purgatory: Use -D__DISABLE_EXPORTS Sami Tolvanen
2025-02-17 18:25 ` Vasily Gorbik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox