ANDROID: drivers/misc: disable LTO for lkdtm_rodata.o
authorSami Tolvanen <samitolvanen@google.com>
Tue, 5 Dec 2017 20:54:13 +0000 (12:54 -0800)
committerSami Tolvanen <samitolvanen@google.com>
Thu, 26 Apr 2018 23:03:37 +0000 (16:03 -0700)
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 <samitolvanen@google.com>
drivers/misc/Makefile

index 63e802aebb03007c6fe601ec4ee75a79939e02d3..a4ccc7d3f91424c4bc99e5efb6c0728750c4a4b9 100644 (file)
@@ -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 := \