aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorTim Abbott <tabbott@ksplice.com>2009-09-27 13:57:55 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2009-12-06 05:18:25 -0500
commit7c5fd5619dc89fb52d2c2cf144fc6e4365427b86 (patch)
tree8dc7c7a29ea4a624e59102447fca136dd9cff9f2 /arch/m68k
parent5cdef24b2ab44ca587d46d212468b0cfb5b83a59 (diff)
m68k: Cleanup linker scripts using new linker script macros.
Signed-off-by: Tim Abbott <tabbott@ksplice.com> Tested-by: Andreas Schwab <schwab@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/kernel/vmlinux-std.lds61
-rw-r--r--arch/m68k/kernel/vmlinux-sun3.lds54
2 files changed, 20 insertions, 95 deletions
diff --git a/arch/m68k/kernel/vmlinux-std.lds b/arch/m68k/kernel/vmlinux-std.lds
index 47eac19e8f61..878be5f38cad 100644
--- a/arch/m68k/kernel/vmlinux-std.lds
+++ b/arch/m68k/kernel/vmlinux-std.lds
@@ -2,6 +2,7 @@
2 2
3#include <asm-generic/vmlinux.lds.h> 3#include <asm-generic/vmlinux.lds.h>
4#include <asm/page.h> 4#include <asm/page.h>
5#include <asm/thread_info.h>
5 6
6OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") 7OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
7OUTPUT_ARCH(m68k) 8OUTPUT_ARCH(m68k)
@@ -22,73 +23,37 @@ SECTIONS
22 23
23 _etext = .; /* End of text section */ 24 _etext = .; /* End of text section */
24 25
25 . = ALIGN(16); /* Exception table */ 26 EXCEPTION_TABLE(16)
26 __start___ex_table = .;
27 __ex_table : { *(__ex_table) }
28 __stop___ex_table = .;
29 27
30 RODATA 28 RODATA
31 29
32 .data : { /* Data */ 30 RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
33 DATA_DATA
34 CONSTRUCTORS
35 }
36 31
37 . = ALIGN(16); 32 BSS_SECTION(0, 0, 0)
38 .data.cacheline_aligned : { *(.data.cacheline_aligned) }
39
40 .bss : { *(.bss) } /* BSS */
41 33
42 _edata = .; /* End of data section */ 34 _edata = .; /* End of data section */
43 35
44 /* will be freed after init */ 36 /* will be freed after init */
45 . = ALIGN(PAGE_SIZE); /* Init code and data */ 37 . = ALIGN(PAGE_SIZE); /* Init code and data */
46 __init_begin = .; 38 __init_begin = .;
47 .init.text : { 39 INIT_TEXT_SECTION(PAGE_SIZE) :data
48 _sinittext = .; 40 INIT_DATA_SECTION(16)
49 INIT_TEXT
50 _einittext = .;
51 } :data
52 .init.data : { INIT_DATA }
53 . = ALIGN(16);
54 __setup_start = .;
55 .init.setup : { *(.init.setup) }
56 __setup_end = .;
57 __initcall_start = .;
58 .initcall.init : {
59 INITCALLS
60 }
61 __initcall_end = .;
62 __con_initcall_start = .;
63 .con_initcall.init : { *(.con_initcall.init) }
64 __con_initcall_end = .;
65 .m68k_fixup : { 41 .m68k_fixup : {
66 __start_fixup = .; 42 __start_fixup = .;
67 *(.m68k_fixup) 43 *(.m68k_fixup)
68 __stop_fixup = .; 44 __stop_fixup = .;
69 } 45 }
70 SECURITY_INIT
71#ifdef CONFIG_BLK_DEV_INITRD
72 . = ALIGN(8192);
73 __initramfs_start = .;
74 .init.ramfs : { *(.init.ramfs) }
75 __initramfs_end = .;
76#endif
77 NOTES 46 NOTES
78 . = ALIGN(8192); 47 .init_end : {
79 __init_end = .; 48 /* This ALIGN be in a section so that _end is at the end of the
80 49 load segment. */
81 .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */ 50 . = ALIGN(PAGE_SIZE);
51 __init_end = .;
52 }
82 53
83 _end = . ; 54 _end = . ;
84 55
85 /* Stabs debugging sections. */ 56 STABS_DEBUG
86 .stab 0 : { *(.stab) }
87 .stabstr 0 : { *(.stabstr) }
88 .stab.excl 0 : { *(.stab.excl) }
89 .stab.exclstr 0 : { *(.stab.exclstr) }
90 .stab.index 0 : { *(.stab.index) }
91 .stab.indexstr 0 : { *(.stab.indexstr) }
92 .comment 0 : { *(.comment) } 57 .comment 0 : { *(.comment) }
93 58
94 /* Sections to be discarded */ 59 /* Sections to be discarded */
diff --git a/arch/m68k/kernel/vmlinux-sun3.lds b/arch/m68k/kernel/vmlinux-sun3.lds
index 03efaf04d7d7..1ad6b7ad2c17 100644
--- a/arch/m68k/kernel/vmlinux-sun3.lds
+++ b/arch/m68k/kernel/vmlinux-sun3.lds
@@ -2,6 +2,7 @@
2 2
3#include <asm-generic/vmlinux.lds.h> 3#include <asm-generic/vmlinux.lds.h>
4#include <asm/page.h> 4#include <asm/page.h>
5#include <asm/thread_info.h>
5 6
6OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k") 7OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
7OUTPUT_ARCH(m68k) 8OUTPUT_ARCH(m68k)
@@ -23,14 +24,8 @@ SECTIONS
23 24
24 _etext = .; /* End of text section */ 25 _etext = .; /* End of text section */
25 26
26 .data : { /* Data */ 27 EXCEPTION_TABLE(16) :data
27 DATA_DATA 28 RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) :data
28 CONSTRUCTORS
29 . = ALIGN(16); /* Exception table */
30 __start___ex_table = .;
31 *(__ex_table)
32 __stop___ex_table = .;
33 } :data
34 /* End of data goes *here* so that freeing init code works properly. */ 29 /* End of data goes *here* so that freeing init code works properly. */
35 _edata = .; 30 _edata = .;
36 NOTES 31 NOTES
@@ -38,56 +33,21 @@ SECTIONS
38 /* will be freed after init */ 33 /* will be freed after init */
39 . = ALIGN(PAGE_SIZE); /* Init code and data */ 34 . = ALIGN(PAGE_SIZE); /* Init code and data */
40__init_begin = .; 35__init_begin = .;
41 .init.text : { 36 INIT_TEXT_SECTION(PAGE_SIZE)
42 _sinittext = .; 37 INIT_DATA_SECTION(16)
43 INIT_TEXT
44 _einittext = .;
45 }
46 .init.data : { INIT_DATA }
47 . = ALIGN(16);
48 __setup_start = .;
49 .init.setup : { *(.init.setup) }
50 __setup_end = .;
51 __initcall_start = .;
52 .initcall.init : {
53 INITCALLS
54 }
55 __initcall_end = .;
56 __con_initcall_start = .;
57 .con_initcall.init : { *(.con_initcall.init) }
58 __con_initcall_end = .;
59 .m68k_fixup : { 38 .m68k_fixup : {
60 __start_fixup = .; 39 __start_fixup = .;
61 *(.m68k_fixup) 40 *(.m68k_fixup)
62 __stop_fixup = .; 41 __stop_fixup = .;
63 } 42 }
64 SECURITY_INIT
65#ifdef CONFIG_BLK_DEV_INITRD
66 . = ALIGN(PAGE_SIZE);
67 __initramfs_start = .;
68 .init.ramfs : { *(.init.ramfs) }
69 __initramfs_end = .;
70#endif
71 . = ALIGN(PAGE_SIZE); 43 . = ALIGN(PAGE_SIZE);
72 __init_end = .; 44 __init_end = .;
73 .data.init.task : { *(.data.init_task) }
74
75 45
76 .bss : { *(.bss) } /* BSS */ 46 BSS_SECTION(0, 0, 0)
77 47
78 _end = . ; 48 _end = . ;
79 49
80 .crap : { 50 STABS_DEBUG
81 /* Stabs debugging sections. */
82 *(.stab)
83 *(.stabstr)
84 *(.stab.excl)
85 *(.stab.exclstr)
86 *(.stab.index)
87 *(.stab.indexstr)
88 *(.comment)
89 *(.note)
90 }
91 51
92 /* Sections to be discarded */ 52 /* Sections to be discarded */
93 DISCARDS 53 DISCARDS