diff options
author | Kees Cook <keescook@chromium.org> | 2016-02-22 22:09:29 (GMT) |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2016-06-10 22:57:50 (GMT) |
commit | 9a49a528dcf3c2022ff89f700d5d0345b9abf288 (patch) | |
tree | 946dc7b2e73cf54e9b349f881970d47755060c42 /drivers/misc/Makefile | |
parent | 426f3a53d4a1ffbe228f268e5c4af148686b7346 (diff) | |
download | linux-9a49a528dcf3c2022ff89f700d5d0345b9abf288.tar.xz |
lkdtm: add function for testing .rodata section
This adds a function that lives in the .rodata section. The section
flags are corrected using objcopy since there is no way with gcc to
declare section flags in an architecture-agnostic way.
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'drivers/misc/Makefile')
-rw-r--r-- | drivers/misc/Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index c3cb6ad..7d45ed4 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -59,3 +59,11 @@ obj-$(CONFIG_CXL_BASE) += cxl/ obj-$(CONFIG_PANEL) += panel.o lkdtm-$(CONFIG_LKDTM) += lkdtm_core.o +lkdtm-$(CONFIG_LKDTM) += lkdtm_rodata_objcopy.o + +OBJCOPYFLAGS := +OBJCOPYFLAGS_lkdtm_rodata_objcopy.o := \ + --set-section-flags .text=alloc,readonly \ + --rename-section .text=.rodata +$(obj)/lkdtm_rodata_objcopy.o: $(obj)/lkdtm_rodata.o + $(call if_changed,objcopy) |