From 0cdcef50ae124a8ca42c3797f8a6511934e6e483 Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Tue, 5 Dec 2017 12:54:13 -0800 Subject: [PATCH] ANDROID: drivers/misc: disable LTO for lkdtm_rodata.o Disable LTO for lkdtm_rodata.o to allow objcopy to be used to manipulate sections. Bug: 62093296 Bug: 67506682 Change-Id: Iedd1a3a2a9b06f44e7ceb6ac287ea764eaf5ef0a Signed-off-by: Sami Tolvanen --- drivers/misc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 63e802aebb03..a4ccc7d3f914 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -69,6 +69,7 @@ lkdtm-$(CONFIG_LKDTM) += lkdtm_rodata_objcopy.o lkdtm-$(CONFIG_LKDTM) += lkdtm_usercopy.o KCOV_INSTRUMENT_lkdtm_rodata.o := n +CFLAGS_lkdtm_rodata.o += $(DISABLE_LTO) OBJCOPYFLAGS := OBJCOPYFLAGS_lkdtm_rodata_objcopy.o := \ -- 2.20.1