diff options
author | Kees Cook <keescook@chromium.org> | 2018-10-10 17:18:18 -0700 |
---|---|---|
committer | James Morris <james.morris@microsoft.com> | 2018-10-10 20:40:21 -0700 |
commit | 1e80cd1672bc77c96fa72205ba6db78dc10825b4 (patch) | |
tree | 7ed2259bdb191cb4770f6581876572ee8bd28525 /include/asm-generic | |
parent | 98d291708cbaab06efec195d0810a7ef60f7603a (diff) | |
download | linux-1e80cd1672bc77c96fa72205ba6db78dc10825b4.tar.gz linux-1e80cd1672bc77c96fa72205ba6db78dc10825b4.tar.bz2 linux-1e80cd1672bc77c96fa72205ba6db78dc10825b4.zip |
vmlinux.lds.h: Avoid copy/paste of security_init section
Avoid copy/paste by defining SECURITY_INIT in terms of SECURITY_INITCALL.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: James Morris <james.morris@microsoft.com>
Reviewed-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 7b75ff6e2fce..934a45395547 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -473,13 +473,6 @@ #define RODATA RO_DATA_SECTION(4096) #define RO_DATA(align) RO_DATA_SECTION(align) -#define SECURITY_INIT \ - .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \ - __security_initcall_start = .; \ - KEEP(*(.security_initcall.init)) \ - __security_initcall_end = .; \ - } - /* * .text section. Map to function alignment to avoid address changes * during second ld run in second ld pass when generating System.map @@ -798,6 +791,12 @@ KEEP(*(.security_initcall.init)) \ __security_initcall_end = .; +/* Older linker script style for security init. */ +#define SECURITY_INIT \ + .security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \ + SECURITY_INITCALL \ + } + #ifdef CONFIG_BLK_DEV_INITRD #define INIT_RAM_FS \ . = ALIGN(4); \ |