]> err.no Git - linux-2.6/commitdiff
[ARM] Ensure head text is always placed at the start of kernel
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Tue, 8 May 2007 14:15:45 +0000 (15:15 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 8 May 2007 14:15:45 +0000 (15:15 +0100)
Commit 86c0baf123e474b6eb404798926ecf62b426bf3a 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: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/head-nommu.S
arch/arm/kernel/head.S
arch/arm/kernel/vmlinux.lds.S

index 0119c0d5f9788009b30cd135b3a8b51dda9c354d..5d78ffb8a9a7fe0e653f9356d5b873896492a53c 100644 (file)
@@ -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
index 1d35edacc01113af898946e8d5b33f4b7a0dc17d..41f98b4ba2ee256d5998a514dd20bcf250bad577 100644 (file)
@@ -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
index faf32de5c5ad4dffb63d8d43cda1f66a74f70805..e4156e7868ce5987ef5311c1b2c309cda121beb8 100644 (file)
@@ -23,11 +23,15 @@ SECTIONS
 #else
        . = PAGE_OFFSET + TEXT_OFFSET;
 #endif
-       .init : {                       /* Init code and data           */
+       .text.head : {
                _stext = .;
-                       _sinittext = .;
+               _sinittext = .;
+               *(.text.head)
+       }
+
+       .init : {                       /* Init code and data           */
                        *(.init.text)
-                       _einittext = .;
+               _einittext = .;
                __proc_info_begin = .;
                        *(.proc.info.init)
                __proc_info_end = .;