Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=08fdffd4cf4ddd4eb4b32e78f93f4ff53ccec78f
Commit:     08fdffd4cf4ddd4eb4b32e78f93f4ff53ccec78f
Parent:     4efb4482729d2cc7926f49f997a28370e701073f
Author:     Russell King <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 15:15:45 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Tue May 8 15:15:45 2007 +0100

    [ARM] Ensure head text is always placed at the start of kernel
    
    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 <[EMAIL PROTECTED]>
---
 arch/arm/kernel/head-nommu.S  |    2 +-
 arch/arm/kernel/head.S        |    2 +-
 arch/arm/kernel/vmlinux.lds.S |   10 +++++++---
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 0119c0d..5d78ffb 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -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
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 1d35eda..41f98b4 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -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
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index faf32de..e4156e7 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -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 = .;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to