Commit 62bef288 authored by Tim Abbott's avatar Tim Abbott Committed by Linus Torvalds

powerpc: Cleanup linker script using new linker script macros.

Signed-off-by: default avatarTim Abbott <tabbott@ksplice.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4a5e3513
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/thread_info.h>
ENTRY(_stext) ENTRY(_stext)
...@@ -71,12 +72,7 @@ SECTIONS ...@@ -71,12 +72,7 @@ SECTIONS
/* Read-only data */ /* Read-only data */
RODATA RODATA
/* Exception & bug tables */ EXCEPTION_TABLE(0)
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
}
NOTES :kernel :notes NOTES :kernel :notes
...@@ -93,12 +89,7 @@ SECTIONS ...@@ -93,12 +89,7 @@ SECTIONS
*/ */
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__init_begin = .; __init_begin = .;
INIT_TEXT_SECTION(PAGE_SIZE) :kernel
.init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
_sinittext = .;
INIT_TEXT
_einittext = .;
} :kernel
/* .exit.text is discarded at runtime, not link time, /* .exit.text is discarded at runtime, not link time,
* to deal with references from __bug_table * to deal with references from __bug_table
...@@ -122,23 +113,16 @@ SECTIONS ...@@ -122,23 +113,16 @@ SECTIONS
#endif #endif
} }
. = ALIGN(16);
.init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) { .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
__setup_start = .; INIT_SETUP(16)
*(.init.setup)
__setup_end = .;
} }
.initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) { .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
__initcall_start = .; INIT_CALLS
INITCALLS
__initcall_end = .;
} }
.con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) { .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
__con_initcall_start = .; CON_INITCALL
*(.con_initcall.init)
__con_initcall_end = .;
} }
SECURITY_INIT SECURITY_INIT
...@@ -169,14 +153,10 @@ SECTIONS ...@@ -169,14 +153,10 @@ SECTIONS
__stop___fw_ftr_fixup = .; __stop___fw_ftr_fixup = .;
} }
#endif #endif
#ifdef CONFIG_BLK_DEV_INITRD
. = ALIGN(PAGE_SIZE);
.init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) { .init.ramfs : AT(ADDR(.init.ramfs) - LOAD_OFFSET) {
__initramfs_start = .; INIT_RAM_FS
*(.init.ramfs)
__initramfs_end = .;
} }
#endif
PERCPU(PAGE_SIZE) PERCPU(PAGE_SIZE)
. = ALIGN(8); . = ALIGN(8);
...@@ -240,36 +220,24 @@ SECTIONS ...@@ -240,36 +220,24 @@ SECTIONS
#endif #endif
/* The initial task and kernel stack */ /* The initial task and kernel stack */
#ifdef CONFIG_PPC32
. = ALIGN(8192);
#else
. = ALIGN(16384);
#endif
.data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) { .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
*(.data.init_task) INIT_TASK_DATA(THREAD_SIZE)
} }
. = ALIGN(PAGE_SIZE);
.data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) { .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
*(.data.page_aligned) PAGE_ALIGNED_DATA(PAGE_SIZE)
} }
. = ALIGN(L1_CACHE_BYTES);
.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
*(.data.cacheline_aligned) CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
} }
. = ALIGN(L1_CACHE_BYTES);
.data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) {
*(.data.read_mostly) READ_MOSTLY_DATA(L1_CACHE_BYTES)
} }
. = ALIGN(PAGE_SIZE);
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
__nosave_begin = .; NOSAVE_DATA
*(.data.nosave)
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
} }
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
...@@ -280,14 +248,7 @@ SECTIONS ...@@ -280,14 +248,7 @@ SECTIONS
* And finally the bss * And finally the bss
*/ */
.bss : AT(ADDR(.bss) - LOAD_OFFSET) { BSS_SECTION(0, 0, 0)
__bss_start = .;
*(.sbss) *(.scommon)
*(.dynbss)
*(.bss)
*(COMMON)
__bss_stop = .;
}
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
_end = . ; _end = . ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment