2005-11-05 00:36:59 +01:00
|
|
|
#ifdef CONFIG_PPC64
|
2005-09-30 08:16:52 +02:00
|
|
|
#include <asm/page.h>
|
2006-03-28 14:15:54 +02:00
|
|
|
#define PROVIDE32(x) PROVIDE(__unused__##x)
|
2005-11-05 00:36:59 +01:00
|
|
|
#else
|
|
|
|
#define PAGE_SIZE 4096
|
|
|
|
#define KERNELBASE CONFIG_KERNEL_START
|
2006-03-28 14:15:54 +02:00
|
|
|
#define PROVIDE32(x) PROVIDE(x)
|
2005-11-05 00:36:59 +01:00
|
|
|
#endif
|
2005-09-26 08:04:21 +02:00
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
2007-07-04 06:04:31 +02:00
|
|
|
#include <asm/cache.h>
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2005-11-03 06:03:06 +01:00
|
|
|
ENTRY(_stext)
|
|
|
|
|
2005-09-30 08:16:52 +02:00
|
|
|
#ifdef CONFIG_PPC64
|
|
|
|
OUTPUT_ARCH(powerpc:common64)
|
|
|
|
jiffies = jiffies_64;
|
|
|
|
#else
|
2005-09-26 08:04:21 +02:00
|
|
|
OUTPUT_ARCH(powerpc:common)
|
|
|
|
jiffies = jiffies_64 + 4;
|
2005-09-30 08:16:52 +02:00
|
|
|
#endif
|
2005-09-26 08:04:21 +02:00
|
|
|
SECTIONS
|
|
|
|
{
|
2006-03-28 14:15:54 +02:00
|
|
|
/* Sections to be discarded. */
|
|
|
|
/DISCARD/ : {
|
|
|
|
*(.exitcall.exit)
|
|
|
|
*(.exit.data)
|
|
|
|
}
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
. = KERNELBASE;
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
/*
|
|
|
|
* Text, read only data and other permanent read-only sections
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Text and gots */
|
|
|
|
.text : {
|
2006-12-07 02:14:04 +01:00
|
|
|
_text = .;
|
2007-05-13 00:31:33 +02:00
|
|
|
TEXT_TEXT
|
2006-03-28 14:15:54 +02:00
|
|
|
SCHED_TEXT
|
|
|
|
LOCK_TEXT
|
|
|
|
KPROBES_TEXT
|
|
|
|
*(.fixup)
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
#ifdef CONFIG_PPC32
|
|
|
|
*(.got1)
|
|
|
|
__got2_start = .;
|
|
|
|
*(.got2)
|
|
|
|
__got2_end = .;
|
|
|
|
#endif /* CONFIG_PPC32 */
|
|
|
|
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
_etext = .;
|
|
|
|
PROVIDE32 (etext = .);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Read-only data */
|
|
|
|
RODATA
|
|
|
|
|
|
|
|
/* Exception & bug tables */
|
2005-09-26 08:04:21 +02:00
|
|
|
__ex_table : {
|
|
|
|
__start___ex_table = .;
|
|
|
|
*(__ex_table)
|
|
|
|
__stop___ex_table = .;
|
|
|
|
}
|
|
|
|
|
2007-07-19 10:48:38 +02:00
|
|
|
NOTES
|
|
|
|
|
2006-12-08 12:30:41 +01:00
|
|
|
BUG_TABLE
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
/*
|
|
|
|
* Init sections discarded at runtime
|
|
|
|
*/
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
__init_begin = .;
|
|
|
|
|
|
|
|
.init.text : {
|
|
|
|
_sinittext = .;
|
|
|
|
*(.init.text)
|
|
|
|
_einittext = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* .exit.text is discarded at runtime, not link time,
|
|
|
|
* to deal with references from __bug_table
|
|
|
|
*/
|
|
|
|
.exit.text : { *(.exit.text) }
|
|
|
|
|
|
|
|
.init.data : {
|
|
|
|
*(.init.data);
|
|
|
|
__vtop_table_begin = .;
|
|
|
|
*(.vtop_fixup);
|
|
|
|
__vtop_table_end = .;
|
|
|
|
__ptov_table_begin = .;
|
|
|
|
*(.ptov_fixup);
|
|
|
|
__ptov_table_end = .;
|
2006-05-19 09:04:48 +02:00
|
|
|
#ifdef CONFIG_PPC_ISERIES
|
|
|
|
__dt_strings_start = .;
|
|
|
|
*(.dt_strings);
|
|
|
|
__dt_strings_end = .;
|
|
|
|
#endif
|
2006-03-28 14:15:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
. = ALIGN(16);
|
|
|
|
.init.setup : {
|
|
|
|
__setup_start = .;
|
|
|
|
*(.init.setup)
|
|
|
|
__setup_end = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
.initcall.init : {
|
|
|
|
__initcall_start = .;
|
2006-10-27 20:41:44 +02:00
|
|
|
INITCALLS
|
2006-03-28 14:15:54 +02:00
|
|
|
__initcall_end = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
.con_initcall.init : {
|
|
|
|
__con_initcall_start = .;
|
|
|
|
*(.con_initcall.init)
|
|
|
|
__con_initcall_end = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
SECURITY_INIT
|
|
|
|
|
|
|
|
. = ALIGN(8);
|
2005-09-30 08:16:52 +02:00
|
|
|
__ftr_fixup : {
|
|
|
|
__start___ftr_fixup = .;
|
|
|
|
*(__ftr_fixup)
|
|
|
|
__stop___ftr_fixup = .;
|
|
|
|
}
|
2006-09-25 10:19:00 +02:00
|
|
|
#ifdef CONFIG_PPC64
|
|
|
|
. = ALIGN(8);
|
|
|
|
__fw_ftr_fixup : {
|
|
|
|
__start___fw_ftr_fixup = .;
|
|
|
|
*(__fw_ftr_fixup)
|
|
|
|
__stop___fw_ftr_fixup = .;
|
|
|
|
}
|
|
|
|
#endif
|
2007-02-10 10:44:44 +01:00
|
|
|
#ifdef CONFIG_BLK_DEV_INITRD
|
2006-03-28 14:15:54 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
.init.ramfs : {
|
|
|
|
__initramfs_start = .;
|
|
|
|
*(.init.ramfs)
|
|
|
|
__initramfs_end = .;
|
|
|
|
}
|
2007-02-10 10:44:44 +01:00
|
|
|
#endif
|
2007-05-02 19:27:12 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2006-03-28 14:15:54 +02:00
|
|
|
.data.percpu : {
|
|
|
|
__per_cpu_start = .;
|
|
|
|
*(.data.percpu)
|
2007-07-19 10:48:12 +02:00
|
|
|
*(.data.percpu.shared_aligned)
|
2006-03-28 14:15:54 +02:00
|
|
|
__per_cpu_end = .;
|
|
|
|
}
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
. = ALIGN(8);
|
|
|
|
.machine.desc : {
|
|
|
|
__machine_desc_start = . ;
|
|
|
|
*(.machine.desc)
|
|
|
|
__machine_desc_end = . ;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* freed after init ends here */
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
__init_end = .;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* And now the various read/write data
|
|
|
|
*/
|
|
|
|
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
_sdata = .;
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2005-09-30 08:16:52 +02:00
|
|
|
#ifdef CONFIG_PPC32
|
2006-03-28 14:15:54 +02:00
|
|
|
.data :
|
|
|
|
{
|
2007-05-17 13:38:44 +02:00
|
|
|
DATA_DATA
|
2006-03-28 14:15:54 +02:00
|
|
|
*(.sdata)
|
|
|
|
*(.got.plt) *(.got)
|
|
|
|
}
|
2005-09-30 08:16:52 +02:00
|
|
|
#else
|
2006-03-28 14:15:54 +02:00
|
|
|
.data : {
|
2007-06-17 04:29:04 +02:00
|
|
|
DATA_DATA
|
|
|
|
*(.data.rel*)
|
|
|
|
*(.toc1)
|
2006-03-28 14:15:54 +02:00
|
|
|
*(.branch_lt)
|
|
|
|
}
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
.opd : {
|
|
|
|
*(.opd)
|
|
|
|
}
|
|
|
|
|
|
|
|
.got : {
|
|
|
|
__toc_start = .;
|
|
|
|
*(.got)
|
|
|
|
*(.toc)
|
|
|
|
}
|
2005-09-30 08:16:52 +02:00
|
|
|
#endif
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
_edata = .;
|
|
|
|
PROVIDE32 (edata = .);
|
|
|
|
|
|
|
|
/* The initial task and kernel stack */
|
|
|
|
#ifdef CONFIG_PPC32
|
|
|
|
. = ALIGN(8192);
|
2005-09-30 08:16:52 +02:00
|
|
|
#else
|
2006-03-28 14:15:54 +02:00
|
|
|
. = ALIGN(16384);
|
|
|
|
#endif
|
|
|
|
.data.init_task : {
|
|
|
|
*(.data.init_task)
|
|
|
|
}
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
.data.page_aligned : {
|
|
|
|
*(.data.page_aligned)
|
|
|
|
}
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
.data.cacheline_aligned : {
|
|
|
|
*(.data.cacheline_aligned)
|
|
|
|
}
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2007-07-04 06:04:31 +02:00
|
|
|
. = ALIGN(L1_CACHE_BYTES);
|
|
|
|
.data.read_mostly : {
|
|
|
|
*(.data.read_mostly)
|
|
|
|
}
|
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
__data_nosave : {
|
|
|
|
__nosave_begin = .;
|
|
|
|
*(.data.nosave)
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
__nosave_end = .;
|
|
|
|
}
|
2005-10-10 14:38:46 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
/*
|
|
|
|
* And finally the bss
|
|
|
|
*/
|
|
|
|
|
|
|
|
.bss : {
|
|
|
|
__bss_start = .;
|
|
|
|
*(.sbss) *(.scommon)
|
|
|
|
*(.dynbss)
|
|
|
|
*(.bss)
|
|
|
|
*(COMMON)
|
|
|
|
__bss_stop = .;
|
|
|
|
}
|
2005-09-26 08:04:21 +02:00
|
|
|
|
2006-03-28 14:15:54 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
_end = . ;
|
|
|
|
PROVIDE32 (end = .);
|
2005-09-26 08:04:21 +02:00
|
|
|
}
|