x86, vmlinux.lds: unify start/end of SECTIONS
authorSam Ravnborg <sam@ravnborg.org>
Wed, 29 Apr 2009 07:47:20 +0000 (09:47 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 29 Apr 2009 08:20:30 +0000 (10:20 +0200)
[ Impact: cleanup ]

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@MIT.EDU>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1240991249-27117-4-git-send-email-sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/vmlinux.lds.S
arch/x86/kernel/vmlinux_32.lds.S
arch/x86/kernel/vmlinux_64.lds.S

index 1a1b303a427267d9044c0cc420cd1ce1d0e90c4f..845776fe52984c8bf9c042fed4890c784cf2c938 100644 (file)
@@ -54,12 +54,26 @@ PHDRS {
        note PT_NOTE FLAGS(0);          /* ___ */
 }
 
+SECTIONS
+{
+#ifdef CONFIG_X86_32
+        . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
+        phys_startup_32 = startup_32 - LOAD_OFFSET;
+#else
+        . = __START_KERNEL;
+        phys_startup_64 = startup_64 - LOAD_OFFSET;
+#endif
+
 #ifdef CONFIG_X86_32
 # include "vmlinux_32.lds.S"
 #else
 # include "vmlinux_64.lds.S"
 #endif
 
+        STABS_DEBUG
+        DWARF_DEBUG
+}
+
 
 #ifdef CONFIG_X86_32
 ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE),
index 4fd40dc50172777248861211e7ed283c818766be..3d3d49c31b0e300cb85b302811214a78ab6b911f 100644 (file)
@@ -1,8 +1,3 @@
-SECTIONS
-{
-       . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;
-       phys_startup_32 = startup_32 - LOAD_OFFSET;
-
        /* Text and read-only data */
        .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
                _text = .;
@@ -205,7 +200,3 @@ SECTIONS
                *(.exitcall.exit)
                *(.discard)
        }
-
-       STABS_DEBUG
-       DWARF_DEBUG
-}
index 6e7cbee0e87f07a33d7cd43c02110e8975c8bbd1..2d7fa2016c316ff772f36cb4d442aacdf59a669b 100644 (file)
@@ -1,8 +1,3 @@
-SECTIONS
-{
-       . = __START_KERNEL;
-       phys_startup_64 = startup_64 - LOAD_OFFSET;
-
        /* Text and read-only data */
        .text :  AT(ADDR(.text) - LOAD_OFFSET) {
                _text = .;
@@ -277,7 +272,3 @@ SECTIONS
                *(.eh_frame)
                *(.discard)
        }
-
-       STABS_DEBUG
-       DWARF_DEBUG
-}