|
@@ -8,6 +8,12 @@
|
|
#include <asm/cache.h>
|
|
#include <asm/cache.h>
|
|
#include <asm/thread_info.h>
|
|
#include <asm/thread_info.h>
|
|
|
|
|
|
|
|
+#ifdef CONFIG_STRICT_KERNEL_RWX
|
|
|
|
+#define STRICT_ALIGN_SIZE (1 << 24)
|
|
|
|
+#else
|
|
|
|
+#define STRICT_ALIGN_SIZE PAGE_SIZE
|
|
|
|
+#endif
|
|
|
|
+
|
|
ENTRY(_stext)
|
|
ENTRY(_stext)
|
|
|
|
|
|
PHDRS {
|
|
PHDRS {
|
|
@@ -123,7 +129,7 @@ SECTIONS
|
|
PROVIDE32 (etext = .);
|
|
PROVIDE32 (etext = .);
|
|
|
|
|
|
/* Read-only data */
|
|
/* Read-only data */
|
|
- RODATA
|
|
|
|
|
|
+ RO_DATA(PAGE_SIZE)
|
|
|
|
|
|
EXCEPTION_TABLE(0)
|
|
EXCEPTION_TABLE(0)
|
|
|
|
|
|
@@ -140,7 +146,7 @@ SECTIONS
|
|
/*
|
|
/*
|
|
* Init sections discarded at runtime
|
|
* Init sections discarded at runtime
|
|
*/
|
|
*/
|
|
- . = ALIGN(PAGE_SIZE);
|
|
|
|
|
|
+ . = ALIGN(STRICT_ALIGN_SIZE);
|
|
__init_begin = .;
|
|
__init_begin = .;
|
|
INIT_TEXT_SECTION(PAGE_SIZE) :kernel
|
|
INIT_TEXT_SECTION(PAGE_SIZE) :kernel
|
|
|
|
|