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 |
Francis Laniel | febebaf | 2020-12-15 20:43:54 -0800 | [diff] [blame] | 13 | lkdtm-$(CONFIG_LKDTM) += fortify.o |
Ganesh Goudar | 3ba150f | 2020-11-30 14:00:57 +0530 | [diff] [blame] | 14 | lkdtm-$(CONFIG_PPC_BOOK3S_64) += powerpc.o |
Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 15 | |
Marco Elver | 6d5a88c | 2020-12-14 19:09:24 -0800 | [diff] [blame] | 16 | KASAN_SANITIZE_rodata.o := n |
Alexander Popov | f90d1e0 | 2018-08-17 01:17:00 +0300 | [diff] [blame] | 17 | KASAN_SANITIZE_stackleak.o := n |
Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 18 | KCOV_INSTRUMENT_rodata.o := n |
Sami Tolvanen | 01dd633 | 2020-12-11 10:46:30 -0800 | [diff] [blame] | 19 | CFLAGS_REMOVE_rodata.o += $(CC_FLAGS_LTO) |
Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 20 | |
| 21 | OBJCOPYFLAGS := |
| 22 | OBJCOPYFLAGS_rodata_objcopy.o := \ |
Mark Rutland | 3f618ab | 2020-12-07 17:05:33 +0000 | [diff] [blame] | 23 | --rename-section .noinstr.text=.rodata,alloc,readonly,load |
Kees Cook | 039a1c42 | 2018-03-06 14:58:09 -0800 | [diff] [blame] | 24 | targets += rodata.o rodata_objcopy.o |
| 25 | $(obj)/rodata_objcopy.o: $(obj)/rodata.o FORCE |
| 26 | $(call if_changed,objcopy) |