blob: a191f51752919bda44f6ac7795b759623083b571 [file] [log] [blame]
Kees Cook039a1c422018-03-06 14:58:09 -08001# SPDX-License-Identifier: GPL-2.0
2obj-$(CONFIG_LKDTM) += lkdtm.o
3
4lkdtm-$(CONFIG_LKDTM) += core.o
5lkdtm-$(CONFIG_LKDTM) += bugs.o
6lkdtm-$(CONFIG_LKDTM) += heap.o
7lkdtm-$(CONFIG_LKDTM) += perms.o
8lkdtm-$(CONFIG_LKDTM) += refcount.o
9lkdtm-$(CONFIG_LKDTM) += rodata_objcopy.o
10lkdtm-$(CONFIG_LKDTM) += usercopy.o
Alexander Popovf90d1e02018-08-17 01:17:00 +030011lkdtm-$(CONFIG_LKDTM) += stackleak.o
Kees Cookb0eb93c2019-08-08 11:37:45 -070012lkdtm-$(CONFIG_LKDTM) += cfi.o
Kees Cook039a1c422018-03-06 14:58:09 -080013
Marco Elver941faf82020-12-14 19:09:24 -080014KASAN_SANITIZE_rodata.o := n
Alexander Popovf90d1e02018-08-17 01:17:00 +030015KASAN_SANITIZE_stackleak.o := n
Kees Cook039a1c422018-03-06 14:58:09 -080016KCOV_INSTRUMENT_rodata.o := n
Sami Tolvanen614b4c42017-12-05 12:54:13 -080017CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO)
Kees Cook039a1c422018-03-06 14:58:09 -080018
19OBJCOPYFLAGS :=
20OBJCOPYFLAGS_rodata_objcopy.o := \
Christophe Leroy3dae11f2021-10-08 18:58:40 +020021 --rename-section .noinstr.text=.rodata,alloc,readonly,load,contents
Kees Cook039a1c422018-03-06 14:58:09 -080022targets += rodata.o rodata_objcopy.o
23$(obj)/rodata_objcopy.o: $(obj)/rodata.o FORCE
24 $(call if_changed,objcopy)