From bc3703f21cec8a2ac6a64f6fb3686fbcb1ba1513 Mon Sep 17 00:00:00 2001 From: Hendrik Brueckner Date: Mon, 20 Nov 2017 11:41:07 +0100 Subject: s390/kernel: emit CFI data in .debug_frame and discard .eh_frame sections Using perf probe and libdw on kernel modules failed to find CFI data for symbols. The CFI data is stored in the .eh_frame section. The elfutils libdw is not able to extract the CFI data correctly, because the .eh_frame section requires "non-simple" relocations for kernel modules. The suggestion is to avoid these "non-simple" relocations by emitting the CFI data in the .debug_frame section. Let gcc emit respective directives by specifying the -fno-asynchronous-unwind-tables option. Using the .debug_frame section for CFI data, the .eh_frame section becomes unused and, thus, discard it for kernel and modules builds The vDSO requires the .eh_frame section and, hence, emit the CFI data in both, the .eh_frame and .debug_frame sections. See also discussion on elfutils/libdw bugzilla: https://sourceware.org/bugzilla/show_bug.cgi?id=22452 Suggested-by: Mark Wielaard Signed-off-by: Hendrik Brueckner Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- arch/s390/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/s390/Makefile') diff --git a/arch/s390/Makefile b/arch/s390/Makefile index de54cfc6109d..494bb9ad5edf 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -90,6 +90,7 @@ endif KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare +KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_AFLAGS += $(aflags-y) OBJCOPYFLAGS := -O binary -- cgit v1.2.3-59-g8ed1b