Merge tag 'mm-hotfixes-stable-2022-07-26' of git://git.kernel.org/pub/scm/linux/kerne...
[linux-2.6-microblaze.git] / drivers / misc / lkdtm / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 obj-$(CONFIG_LKDTM)             += lkdtm.o
3
4 lkdtm-$(CONFIG_LKDTM)           += core.o
5 lkdtm-$(CONFIG_LKDTM)           += bugs.o
6 lkdtm-$(CONFIG_LKDTM)           += heap.o
7 lkdtm-$(CONFIG_LKDTM)           += perms.o
8 lkdtm-$(CONFIG_LKDTM)           += refcount.o
9 lkdtm-$(CONFIG_LKDTM)           += rodata_objcopy.o
10 lkdtm-$(CONFIG_LKDTM)           += usercopy.o
11 lkdtm-$(CONFIG_LKDTM)           += stackleak.o
12 lkdtm-$(CONFIG_LKDTM)           += cfi.o
13 lkdtm-$(CONFIG_LKDTM)           += fortify.o
14 lkdtm-$(CONFIG_PPC_64S_HASH_MMU)        += powerpc.o
15
16 KASAN_SANITIZE_stackleak.o      := n
17
18 KASAN_SANITIZE_rodata.o                 := n
19 KCSAN_SANITIZE_rodata.o                 := n
20 KCOV_INSTRUMENT_rodata.o                := n
21 OBJECT_FILES_NON_STANDARD_rodata.o      := y
22 CFLAGS_REMOVE_rodata.o                  += $(CC_FLAGS_LTO) $(RETHUNK_CFLAGS)
23
24 OBJCOPYFLAGS :=
25 OBJCOPYFLAGS_rodata_objcopy.o   := \
26                         --rename-section .noinstr.text=.rodata,alloc,readonly,load,contents
27 targets += rodata.o rodata_objcopy.o
28 $(obj)/rodata_objcopy.o: $(obj)/rodata.o FORCE
29         $(call if_changed,objcopy)