1 From 3aa2c28ff4271e9232b6c98ba000804de3ed3f33 Mon Sep 17 00:00:00 2001
2 From: Kurt Mahan <kmahan@freescale.com>
3 Date: Mon, 26 Nov 2007 23:41:23 -0700
4 Subject: [PATCH] Rewrite coldfire linker script.
6 LTIBName: mcfv4e-linker-script-update
7 Signed-off-by: Kurt Mahan <kmahan@freescale.com>
9 arch/m68k/coldfire/vmlinux-cf.lds | 107 ++++++++++++++++++++++++-------------
10 arch/m68k/kernel/vmlinux.lds.S | 3 +-
11 2 files changed, 72 insertions(+), 38 deletions(-)
13 --- a/arch/m68k/coldfire/vmlinux-cf.lds
14 +++ b/arch/m68k/coldfire/vmlinux-cf.lds
16 -/* ld script to make m68k Coldfire Linux kernel */
17 +/* ld script to make m68k Coldfire Linux kernel
19 + * Derived from arch/m68k/kernel/vmlinux-std.lds
21 + * Updated 11/26/2007 for new CodeSourcery toolset
22 + * by Kurt Mahan <kmahan@freescale.com>
25 +#define LOAD_OFFSET 0x00000000
27 #include <asm-generic/vmlinux.lds.h>
28 +#include <asm/page_offset.h>
30 +#define START_OFFSET 0x00020000
31 +#define IMAGE_START PAGE_OFFSET_RAW + START_OFFSET
33 OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
36 jiffies = jiffies_64 + 4;
41 - _text = .; /* Text and read-only data */
44 + .text.head : AT(ADDR(.text.head) - LOAD_OFFSET) {
45 + _text = .; /* Text and read-only data */
49 + .text : AT(ADDR(.text) - LOAD_OFFSET) {
58 _etext = .; /* End of text section */
61 - __start___ex_table = .;
62 - __ex_table : { *(__ex_table) }
63 - __stop___ex_table = .;
64 + __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
65 + __start___ex_table = .;
67 + __stop___ex_table = .;
72 - .data : { /* Data */
74 + .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
80 - .bss : { *(.bss) } /* BSS */
81 + .bss : AT(ADDR(.bss) - LOAD_OFFSET) { /* BSS */
86 - .data.cacheline_aligned : { *(.data.cacheline_aligned) } :data
87 + .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET ) {
88 + *(.data.cacheline_aligned)
91 _edata = .; /* End of data section */
93 . = ALIGN(8192); /* Initrd */
96 + .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
102 - .init.data : { *(.init.data) }
104 + .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
110 - .init.setup : { *(.init.setup) }
112 - __initcall_start = .;
114 + .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
120 + .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
121 + __initcall_start = .;
123 + __initcall_end = .;
125 - __initcall_end = .;
126 - __con_initcall_start = .;
127 - .con_initcall.init : { *(.con_initcall.init) }
128 - __con_initcall_end = .;
130 + .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
131 + __con_initcall_start = .;
132 + *(.con_initcall.init)
133 + __con_initcall_end = .;
138 #ifdef CONFIG_BLK_DEV_INITRD
140 - __initramfs_start = .;
141 - .init.ramfs : { *(.init.ramfs) }
142 - __initramfs_end = .;
143 + .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
144 + __initramfs_start = .;
146 + __initramfs_end = .;
153 - .data.init_task : { *(.data.init_task) } /* The initial task and kernel stack */
154 + .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
155 + *(.data.init_task) /* The initial task and kernel stack */
160 @@ -79,14 +118,8 @@ SECTIONS
167 /* Stabs debugging sections. */
168 - .stab 0 : { *(.stab) }
169 - .stabstr 0 : { *(.stabstr) }
170 - .stab.excl 0 : { *(.stab.excl) }
171 - .stab.exclstr 0 : { *(.stab.exclstr) }
172 - .stab.index 0 : { *(.stab.index) }
173 - .stab.indexstr 0 : { *(.stab.indexstr) }
174 - .comment 0 : { *(.comment) }
177 --- a/arch/m68k/kernel/vmlinux.lds.S
178 +++ b/arch/m68k/kernel/vmlinux.lds.S
182 - text PT_LOAD FILEHDR PHDRS FLAGS (7);
183 + headers PT_PHDR PHDRS ;
184 + text PT_LOAD FILEHDR PHDRS FLAGS (5);
185 data PT_LOAD FLAGS (7);