From: Sami Tolvanen Date: Fri, 11 Dec 2020 18:46:30 +0000 (-0800) Subject: drivers/misc/lkdtm: disable LTO for rodata.o X-Git-Tag: accepted/tizen/unified/20230118.172025~7725^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01dd633e7aae169915fea89224acb7a2b688912b;p=platform%2Fkernel%2Flinux-rpi.git drivers/misc/lkdtm: disable LTO for rodata.o Disable LTO for rodata.o to allow objcopy to be used to manipulate sections. Signed-off-by: Sami Tolvanen Acked-by: Kees Cook Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201211184633.3213045-14-samitolvanen@google.com --- diff --git a/drivers/misc/lkdtm/Makefile b/drivers/misc/lkdtm/Makefile index 6b888d0..aa12097 100644 --- a/drivers/misc/lkdtm/Makefile +++ b/drivers/misc/lkdtm/Makefile @@ -16,6 +16,7 @@ lkdtm-$(CONFIG_PPC_BOOK3S_64) += powerpc.o KASAN_SANITIZE_rodata.o := n KASAN_SANITIZE_stackleak.o := n KCOV_INSTRUMENT_rodata.o := n +CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) OBJCOPYFLAGS := OBJCOPYFLAGS_rodata_objcopy.o := \