2005-04-17 00:20:36 +02:00
|
|
|
/* ld script to make s390 Linux kernel
|
|
|
|
* Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
|
|
|
|
*/
|
|
|
|
|
2008-11-27 11:05:58 +01:00
|
|
|
#include <asm/thread_info.h>
|
2007-10-12 16:11:50 +02:00
|
|
|
#include <asm/page.h>
|
2005-04-17 00:20:36 +02:00
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
|
2006-01-06 09:19:28 +01:00
|
|
|
#ifndef CONFIG_64BIT
|
2005-04-17 00:20:36 +02:00
|
|
|
OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
|
|
|
|
OUTPUT_ARCH(s390)
|
|
|
|
ENTRY(_start)
|
|
|
|
jiffies = jiffies_64 + 4;
|
|
|
|
#else
|
|
|
|
OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
|
|
|
|
OUTPUT_ARCH(s390:64-bit)
|
|
|
|
ENTRY(_start)
|
|
|
|
jiffies = jiffies_64;
|
|
|
|
#endif
|
|
|
|
|
2008-01-26 14:11:21 +01:00
|
|
|
PHDRS {
|
|
|
|
text PT_LOAD FLAGS(5); /* R_E */
|
|
|
|
data PT_LOAD FLAGS(7); /* RWE */
|
|
|
|
note PT_NOTE FLAGS(0); /* ___ */
|
|
|
|
}
|
|
|
|
|
2005-04-17 00:20:36 +02:00
|
|
|
SECTIONS
|
|
|
|
{
|
2007-10-12 16:11:49 +02:00
|
|
|
. = 0x00000000;
|
|
|
|
.text : {
|
|
|
|
_text = .; /* Text and read-only data */
|
|
|
|
*(.text.head)
|
2007-05-13 00:31:33 +02:00
|
|
|
TEXT_TEXT
|
2007-10-12 16:11:49 +02:00
|
|
|
SCHED_TEXT
|
|
|
|
LOCK_TEXT
|
|
|
|
KPROBES_TEXT
|
|
|
|
*(.fixup)
|
|
|
|
*(.gnu.warning)
|
2008-02-05 16:50:38 +01:00
|
|
|
} :text = 0x0700
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2007-10-12 16:11:49 +02:00
|
|
|
_etext = .; /* End of text section */
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2008-01-26 14:11:21 +01:00
|
|
|
NOTES :text :note
|
|
|
|
|
2007-10-12 16:11:49 +02:00
|
|
|
RODATA
|
2005-04-17 00:20:36 +02:00
|
|
|
|
|
|
|
#ifdef CONFIG_SHARED_KERNEL
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
|
2007-02-05 21:18:41 +01:00
|
|
|
#endif
|
2005-04-17 00:20:36 +02:00
|
|
|
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2007-10-12 16:11:49 +02:00
|
|
|
_eshared = .; /* End of shareable data */
|
|
|
|
|
|
|
|
. = ALIGN(16); /* Exception table */
|
|
|
|
__ex_table : {
|
|
|
|
__start___ex_table = .;
|
|
|
|
*(__ex_table)
|
|
|
|
__stop___ex_table = .;
|
2008-08-25 18:13:26 +02:00
|
|
|
} :data
|
2007-10-12 16:11:49 +02:00
|
|
|
|
|
|
|
.data : { /* Data */
|
|
|
|
DATA_DATA
|
|
|
|
CONSTRUCTORS
|
|
|
|
}
|
|
|
|
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2007-10-12 16:11:49 +02:00
|
|
|
.data_nosave : {
|
|
|
|
__nosave_begin = .;
|
|
|
|
*(.data.nosave)
|
|
|
|
}
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2007-10-12 16:11:49 +02:00
|
|
|
__nosave_end = .;
|
|
|
|
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2007-10-12 16:11:49 +02:00
|
|
|
.data.page_aligned : {
|
|
|
|
*(.data.idt)
|
|
|
|
}
|
|
|
|
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(0x100);
|
2007-10-12 16:11:49 +02:00
|
|
|
.data.cacheline_aligned : {
|
|
|
|
*(.data.cacheline_aligned)
|
|
|
|
}
|
|
|
|
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(0x100);
|
2007-10-12 16:11:49 +02:00
|
|
|
.data.read_mostly : {
|
|
|
|
*(.data.read_mostly)
|
|
|
|
}
|
|
|
|
_edata = .; /* End of data section */
|
|
|
|
|
2008-11-27 11:05:58 +01:00
|
|
|
. = ALIGN(THREAD_SIZE); /* init_task */
|
2007-10-12 16:11:49 +02:00
|
|
|
.data.init_task : {
|
|
|
|
*(.data.init_task)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* will be freed after init */
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(PAGE_SIZE); /* Init code and data */
|
2007-10-12 16:11:49 +02:00
|
|
|
__init_begin = .;
|
|
|
|
.init.text : {
|
|
|
|
_sinittext = .;
|
2008-01-20 14:15:03 +01:00
|
|
|
INIT_TEXT
|
2007-10-12 16:11:49 +02:00
|
|
|
_einittext = .;
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
* .exit.text is discarded at runtime, not link time,
|
|
|
|
* to deal with references from __bug_table
|
|
|
|
*/
|
|
|
|
.exit.text : {
|
2008-01-20 14:15:03 +01:00
|
|
|
EXIT_TEXT
|
2007-10-12 16:11:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.init.data : {
|
2008-01-20 14:15:03 +01:00
|
|
|
INIT_DATA
|
2007-10-12 16:11:49 +02:00
|
|
|
}
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(0x100);
|
2007-10-12 16:11:49 +02:00
|
|
|
.init.setup : {
|
|
|
|
__setup_start = .;
|
|
|
|
*(.init.setup)
|
|
|
|
__setup_end = .;
|
|
|
|
}
|
|
|
|
.initcall.init : {
|
|
|
|
__initcall_start = .;
|
|
|
|
INITCALLS
|
|
|
|
__initcall_end = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
.con_initcall.init : {
|
|
|
|
__con_initcall_start = .;
|
|
|
|
*(.con_initcall.init)
|
|
|
|
__con_initcall_end = .;
|
|
|
|
}
|
|
|
|
SECURITY_INIT
|
2007-02-10 10:44:44 +01:00
|
|
|
|
|
|
|
#ifdef CONFIG_BLK_DEV_INITRD
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(0x100);
|
2007-10-12 16:11:49 +02:00
|
|
|
.init.ramfs : {
|
|
|
|
__initramfs_start = .;
|
|
|
|
*(.init.ramfs)
|
|
|
|
. = ALIGN(2);
|
|
|
|
__initramfs_end = .;
|
|
|
|
}
|
2007-02-10 10:44:44 +01:00
|
|
|
#endif
|
2007-10-12 16:11:49 +02:00
|
|
|
|
2007-10-12 16:11:50 +02:00
|
|
|
PERCPU(PAGE_SIZE)
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
2007-10-12 16:11:49 +02:00
|
|
|
__init_end = .; /* freed after init ends here */
|
|
|
|
|
|
|
|
/* BSS */
|
|
|
|
.bss : {
|
|
|
|
__bss_start = .;
|
|
|
|
*(.bss)
|
|
|
|
. = ALIGN(2);
|
|
|
|
__bss_stop = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
_end = . ;
|
|
|
|
|
|
|
|
/* Sections to be discarded */
|
|
|
|
/DISCARD/ : {
|
2008-01-20 14:15:03 +01:00
|
|
|
EXIT_DATA
|
2007-10-12 16:11:49 +02:00
|
|
|
*(.exitcall.exit)
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Debugging sections. */
|
|
|
|
STABS_DEBUG
|
|
|
|
DWARF_DEBUG
|
2005-04-17 00:20:36 +02:00
|
|
|
}
|