diff options
author | Richard Braun <rbraun@sceen.net> | 2017-09-03 14:00:15 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-09-03 14:00:15 +0200 |
commit | 5774eb4713e252bd35832c163b0f2b117176c2de (patch) | |
tree | 54f337f304f26d5d166e31384d6b32126f296153 | |
parent | 608cf884efd9bb0ef6a308814fd22b1c8688fabf (diff) |
x86: import macros from the init module
-rw-r--r-- | arch/x86/x15.lds.S | 3 | ||||
-rw-r--r-- | kern/init.h | 8 | ||||
-rw-r--r-- | kern/init_i.h | 6 |
3 files changed, 8 insertions, 9 deletions
diff --git a/arch/x86/x15.lds.S b/arch/x86/x15.lds.S index 352ebf4..80b1e65 100644 --- a/arch/x86/x15.lds.S +++ b/arch/x86/x15.lds.S @@ -8,6 +8,7 @@ OUTPUT_ARCH(i386) ENTRY(_start) +#include <kern/init.h> #include <machine/boot.h> #include <machine/cpu.h> #include <machine/page.h> @@ -45,7 +46,7 @@ SECTIONS *(.init.text) *(.init.data) - . = ALIGN(64); + . = ALIGN(INIT_OP_ALIGN); _init_ops = .; *(.init.ops) _init_ops_end = .; diff --git a/kern/init.h b/kern/init.h index d15d950..8f1cacf 100644 --- a/kern/init.h +++ b/kern/init.h @@ -16,8 +16,6 @@ * * * Init sections and operations. - * - * TODO Make the x86 linker script use macros from this header. */ #ifndef _KERN_INIT_H @@ -36,6 +34,12 @@ */ #define INIT_OPS_SECTION .init.ops +/* + * Alignment is important to make sure initialization operations are + * stored as a C array in the reserved init op section. + */ +#define INIT_OP_ALIGN 64 + #ifndef __ASSEMBLER__ #include <kern/error.h> diff --git a/kern/init_i.h b/kern/init_i.h index 7a6b463..ed59062 100644 --- a/kern/init_i.h +++ b/kern/init_i.h @@ -18,12 +18,6 @@ #ifndef _KERN_INIT_I_H #define _KERN_INIT_I_H -/* - * Alignment is important to make sure initialization operations are - * stored as a C array in the reserved init op section. - */ -#define INIT_OP_ALIGN 64 - #include <stdalign.h> #include <stdbool.h> #include <stddef.h> |