2005-04-16 15:20:36 -07: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>
|
2016-05-28 10:03:55 +02:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Put .bss..swapper_pg_dir as the first thing in .bss. This will
|
|
|
|
|
* make sure it has 16k alignment.
|
|
|
|
|
*/
|
|
|
|
|
#define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)
|
|
|
|
|
|
2016-06-07 10:12:55 +02:00
|
|
|
/* Handle ro_after_init data on our own. */
|
|
|
|
|
#define RO_AFTER_INIT_DATA
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
#include <asm-generic/vmlinux.lds.h>
|
|
|
|
|
|
|
|
|
|
OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
|
|
|
|
|
OUTPUT_ARCH(s390:64-bit)
|
2012-01-18 18:03:39 +01:00
|
|
|
ENTRY(startup)
|
2005-04-16 15:20:36 -07:00
|
|
|
jiffies = jiffies_64;
|
|
|
|
|
|
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-16 15:20:36 -07:00
|
|
|
SECTIONS
|
|
|
|
|
{
|
2007-10-12 16:11:49 +02:00
|
|
|
. = 0x00000000;
|
|
|
|
|
.text : {
|
|
|
|
|
_text = .; /* Text and read-only data */
|
2009-04-25 22:11:06 -04:00
|
|
|
HEAD_TEXT
|
|
|
|
|
TEXT_TEXT
|
2007-10-12 16:11:49 +02:00
|
|
|
SCHED_TEXT
|
2016-10-07 17:02:55 -07:00
|
|
|
CPUIDLE_TEXT
|
2007-10-12 16:11:49 +02:00
|
|
|
LOCK_TEXT
|
|
|
|
|
KPROBES_TEXT
|
2009-06-12 10:26:46 +02:00
|
|
|
IRQENTRY_TEXT
|
2016-03-25 14:22:05 -07:00
|
|
|
SOFTIRQENTRY_TEXT
|
2007-10-12 16:11:49 +02:00
|
|
|
*(.fixup)
|
|
|
|
|
*(.gnu.warning)
|
2008-02-05 16:50:38 +01:00
|
|
|
} :text = 0x0700
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-10-12 16:11:49 +02:00
|
|
|
_etext = .; /* End of text section */
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-26 14:11:21 +01:00
|
|
|
NOTES :text :note
|
|
|
|
|
|
2011-11-14 11:19:02 +01:00
|
|
|
.dummy : { *(.dummy) } :data
|
|
|
|
|
|
2012-07-24 16:32:39 +02:00
|
|
|
RO_DATA_SECTION(PAGE_SIZE)
|
2005-04-16 15:20:36 -07: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-16 15:20:36 -07: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 */
|
2009-10-06 10:33:57 +02:00
|
|
|
_sdata = .; /* Start of data section */
|
2007-10-12 16:11:49 +02:00
|
|
|
|
2016-06-07 10:12:55 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
|
__start_ro_after_init = .;
|
2016-11-10 10:46:44 -08:00
|
|
|
__start_data_ro_after_init = .;
|
2016-06-07 10:12:55 +02:00
|
|
|
.data..ro_after_init : {
|
|
|
|
|
*(.data..ro_after_init)
|
|
|
|
|
}
|
2016-11-10 10:46:44 -08:00
|
|
|
__end_data_ro_after_init = .;
|
2016-06-07 10:12:55 +02:00
|
|
|
EXCEPTION_TABLE(16)
|
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
|
|
|
__end_ro_after_init = .;
|
2007-10-12 16:11:49 +02:00
|
|
|
|
2009-09-11 10:28:44 +02:00
|
|
|
RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
|
2007-10-12 16:11:49 +02:00
|
|
|
|
|
|
|
|
_edata = .; /* End of data section */
|
|
|
|
|
|
|
|
|
|
/* 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 = .;
|
2009-09-11 10:28:44 +02:00
|
|
|
|
|
|
|
|
INIT_TEXT_SECTION(PAGE_SIZE)
|
|
|
|
|
|
2007-10-12 16:11:49 +02:00
|
|
|
/*
|
|
|
|
|
* .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
|
|
|
}
|
|
|
|
|
|
2013-02-11 14:26:24 +01:00
|
|
|
.exit.data : {
|
|
|
|
|
EXIT_DATA
|
|
|
|
|
}
|
|
|
|
|
|
2009-03-26 15:23:58 +01:00
|
|
|
/* early.c uses stsi, which requires page aligned data. */
|
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
2009-09-11 10:28:44 +02:00
|
|
|
INIT_DATA_SECTION(0x100)
|
2007-10-12 16:11:49 +02:00
|
|
|
|
2011-03-24 18:50:09 +01:00
|
|
|
PERCPU_SECTION(0x100)
|
2007-10-12 16:11:50 +02:00
|
|
|
. = ALIGN(PAGE_SIZE);
|
2007-10-12 16:11:49 +02:00
|
|
|
__init_end = .; /* freed after init ends here */
|
|
|
|
|
|
2016-05-28 10:03:55 +02:00
|
|
|
BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
|
2007-10-12 16:11:49 +02:00
|
|
|
|
|
|
|
|
_end = . ;
|
|
|
|
|
|
|
|
|
|
/* Debugging sections. */
|
|
|
|
|
STABS_DEBUG
|
|
|
|
|
DWARF_DEBUG
|
2009-07-09 11:27:40 +09:00
|
|
|
|
|
|
|
|
/* Sections to be discarded */
|
|
|
|
|
DISCARDS
|
2005-04-16 15:20:36 -07:00
|
|
|
}
|