Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08fdffd4 authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[ARM] Ensure head text is always placed at the start of kernel



Commit 86c0baf1 highlighted that we
may end up with the head text placed elsewhere in the kernel image.
Introduce a new .text.head section to contain the initial kernel
startup code, and always place this section at the beginning of the
kernel image.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 4efb4482
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@
 * numbers for r1.
 *
 */
	__INIT
	.section ".text.head", "ax"
	.type	stext, %function
ENTRY(stext)
	msr	cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@
 * crap here - that's what the boot loader (or in extreme, well justified
 * circumstances, zImage) is for.
 */
	__INIT
	.section ".text.head", "ax"
	.type	stext, %function
ENTRY(stext)
	msr	cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
+7 −3
Original line number Diff line number Diff line
@@ -23,9 +23,13 @@ SECTIONS
#else
	. = PAGE_OFFSET + TEXT_OFFSET;
#endif
	.init : {			/* Init code and data		*/
	.text.head : {
		_stext = .;
		_sinittext = .;
		*(.text.head)
	}

	.init : {			/* Init code and data		*/
			*(.init.text)
		_einittext = .;
		__proc_info_begin = .;