summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2016-06-23 21:28:47 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2016-07-02 11:01:30 +0100
commit14c4a533e0996f95a0a64dfd0b6252d788cebc74 (patch)
treeadf6541d18a25971d9155e3f1502fd75a5aa658f /arch/arm/kernel/vmlinux.lds.S
parent520319de0ced43c21c0aaef3c2392fb607d05419 (diff)
ARM: 8583/1: mm: fix location of _etext
The _etext position is defined to be the end of the kernel text code, and should not include any part of the data segments. This interferes with things that might check memory ranges and expect executable code up to _etext. Just to be conservative, leave the kernel resource as it was, using __init_begin instead of _etext as the end mark. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/vmlinux.lds.S')
-rw-r--r--arch/arm/kernel/vmlinux.lds.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index e2c6da096cef..99420fc1f066 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -125,6 +125,8 @@ SECTIONS
#ifdef CONFIG_DEBUG_ALIGN_RODATA
. = ALIGN(1<<SECTION_SHIFT);
#endif
+ _etext = .; /* End of text section */
+
RO_DATA(PAGE_SIZE)
. = ALIGN(4);
@@ -155,8 +157,6 @@ SECTIONS
NOTES
- _etext = .; /* End of text and rodata section */
-
#ifdef CONFIG_DEBUG_RODATA
. = ALIGN(1<<SECTION_SHIFT);
#else