Commit 1e80cd16 authored by Kees Cook's avatar Kees Cook Committed by James Morris

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: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
Reviewed-by: default avatarJames Morris <james.morris@microsoft.com>
Reviewed-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarJames Morris <james.morris@microsoft.com>
parent 98d29170
...@@ -473,13 +473,6 @@ ...@@ -473,13 +473,6 @@
#define RODATA RO_DATA_SECTION(4096) #define RODATA RO_DATA_SECTION(4096)
#define RO_DATA(align) RO_DATA_SECTION(align) #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 * .text section. Map to function alignment to avoid address changes
* during second ld run in second ld pass when generating System.map * during second ld run in second ld pass when generating System.map
...@@ -798,6 +791,12 @@ ...@@ -798,6 +791,12 @@
KEEP(*(.security_initcall.init)) \ KEEP(*(.security_initcall.init)) \
__security_initcall_end = .; __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 #ifdef CONFIG_BLK_DEV_INITRD
#define INIT_RAM_FS \ #define INIT_RAM_FS \
. = ALIGN(4); \ . = ALIGN(4); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment