x86, vmlinux.lds: unify .exit.* and .init.ramfs
authorSam Ravnborg <sam@ravnborg.org>
Wed, 29 Apr 2009 07:47:27 +0000 (09:47 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 29 Apr 2009 08:20:34 +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-11-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 c8dd71e..1ab62a5 100644 (file)
@@ -309,6 +309,26 @@ SECTIONS
                *(.altinstr_replacement)
        }
 
+       /*
+        * .exit.text is discard at runtime, not link time, to deal with
+        *  references from .altinstructions and .eh_frame
+        */
+       .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
+               EXIT_TEXT
+       }
+
+       .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
+               EXIT_DATA
+       }
+
+#ifdef CONFIG_BLK_DEV_INITRD
+       . = ALIGN(PAGE_SIZE);
+       .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
+               __initramfs_start = .;
+               *(.init.ramfs)
+               __initramfs_end = .;
+       }
+#endif
 
 #ifdef CONFIG_X86_32
 # include "vmlinux_32.lds.S"
index 5df9647..36c8fbd 100644 (file)
@@ -1,24 +1,3 @@
-       /*
-        * .exit.text is discard at runtime, not link time, to deal with
-        *  references from .altinstructions and .eh_frame
-        */
-       .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
-               EXIT_TEXT
-       }
-
-       .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
-               EXIT_DATA
-       }
-
-#if defined(CONFIG_BLK_DEV_INITRD)
-       . = ALIGN(PAGE_SIZE);
-       .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
-               __initramfs_start = .;
-               *(.init.ramfs)
-               __initramfs_end = .;
-       }
-#endif
-
        PERCPU(PAGE_SIZE)
 
        . = ALIGN(PAGE_SIZE);
index 9ef7096..1aa5362 100644 (file)
@@ -1,24 +1,3 @@
-       /*
-        * .exit.text is discard at runtime, not link time, to deal with
-        *  references from .altinstructions and .eh_frame
-        */
-       .exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
-               EXIT_TEXT
-       }
-
-       .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
-               EXIT_DATA
-       }
-
-#ifdef CONFIG_BLK_DEV_INITRD
-       . = ALIGN(PAGE_SIZE);
-       .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
-               __initramfs_start = .;
-               *(.init.ramfs)
-               __initramfs_end = .;
-       }
-#endif
-
 #ifdef CONFIG_SMP
        /*
         * percpu offsets are zero-based on SMP.  PERCPU_VADDR() changes the