Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 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 |
Alexander Popov | f90d1e0 | 2018-08-17 01:17:00 +0300 | [diff] [blame] | 11 | lkdtm-$(CONFIG_LKDTM) += stackleak.o |
Kees Cook | b0eb93c | 2019-08-08 11:37:45 -0700 | [diff] [blame] | 12 | lkdtm-$(CONFIG_LKDTM) += cfi.o |
Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 13 | |
Marco Elver | 941faf8 | 2020-12-14 19:09:24 -0800 | [diff] [blame] | 14 | KASAN_SANITIZE_rodata.o := n |
Alexander Popov | f90d1e0 | 2018-08-17 01:17:00 +0300 | [diff] [blame] | 15 | KASAN_SANITIZE_stackleak.o := n |
Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 16 | KCOV_INSTRUMENT_rodata.o := n |
Sami Tolvanen | 614b4c4 | 2017-12-05 12:54:13 -0800 | [diff] [blame] | 17 | CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) |
Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 18 | |
| 19 | OBJCOPYFLAGS := |
| 20 | OBJCOPYFLAGS_rodata_objcopy.o := \ |
Christophe Leroy | 3dae11f | 2021-10-08 18:58:40 +0200 | [diff] [blame] | 21 | --rename-section .noinstr.text=.rodata,alloc,readonly,load,contents |
Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 22 | targets += rodata.o rodata_objcopy.o |
| 23 | $(obj)/rodata_objcopy.o: $(obj)/rodata.o FORCE |
| 24 | $(call if_changed,objcopy) |