Linux Audio

Check our new training course

Loading...
v3.1
 1/* ld script to make s390 Linux kernel
 2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
 3 */
 4
 5#include <asm/thread_info.h>
 6#include <asm/page.h>
 7#include <asm-generic/vmlinux.lds.h>
 8
 9#ifndef CONFIG_64BIT
10OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
11OUTPUT_ARCH(s390)
12ENTRY(_start)
13jiffies = jiffies_64 + 4;
14#else
15OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
16OUTPUT_ARCH(s390:64-bit)
17ENTRY(_start)
18jiffies = jiffies_64;
19#endif
20
21PHDRS {
22	text PT_LOAD FLAGS(5);	/* R_E */
23	data PT_LOAD FLAGS(7);	/* RWE */
24	note PT_NOTE FLAGS(0);	/* ___ */
25}
26
27SECTIONS
28{
29	. = 0x00000000;
30	.text : {
31	_text = .;		/* Text and read-only data */
32		HEAD_TEXT
33		TEXT_TEXT
34		SCHED_TEXT
35		LOCK_TEXT
36		KPROBES_TEXT
37		IRQENTRY_TEXT
38		*(.fixup)
39		*(.gnu.warning)
40	} :text = 0x0700
41
42	_etext = .;		/* End of text section */
43
44	NOTES :text :note
45
46	RODATA
 
 
47
48#ifdef CONFIG_SHARED_KERNEL
49	. = ALIGN(0x100000);	/* VM shared segments are 1MB aligned */
50#endif
51
52	. = ALIGN(PAGE_SIZE);
53	_eshared = .;		/* End of shareable data */
54	_sdata = .;		/* Start of data section */
55
56	EXCEPTION_TABLE(16) :data
57
58	RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
59
60	_edata = .;		/* End of data section */
61
62	/* will be freed after init */
63	. = ALIGN(PAGE_SIZE);	/* Init code and data */
64	__init_begin = .;
65
66	INIT_TEXT_SECTION(PAGE_SIZE)
67
68	/*
69	 * .exit.text is discarded at runtime, not link time,
70	 * to deal with references from __bug_table
71	*/
72	.exit.text : {
73		EXIT_TEXT
 
 
 
 
74	}
75
76	/* early.c uses stsi, which requires page aligned data. */
77	. = ALIGN(PAGE_SIZE);
78	INIT_DATA_SECTION(0x100)
79
80	PERCPU_SECTION(0x100)
81	. = ALIGN(PAGE_SIZE);
82	__init_end = .;		/* freed after init ends here */
83
84	BSS_SECTION(0, 2, 0)
85
86	_end = . ;
87
88	/* Debugging sections.	*/
89	STABS_DEBUG
90	DWARF_DEBUG
91
92	/* Sections to be discarded */
93	DISCARDS
94}
v3.15
  1/* ld script to make s390 Linux kernel
  2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
  3 */
  4
  5#include <asm/thread_info.h>
  6#include <asm/page.h>
  7#include <asm-generic/vmlinux.lds.h>
  8
  9#ifndef CONFIG_64BIT
 10OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
 11OUTPUT_ARCH(s390:31-bit)
 12ENTRY(startup)
 13jiffies = jiffies_64 + 4;
 14#else
 15OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390")
 16OUTPUT_ARCH(s390:64-bit)
 17ENTRY(startup)
 18jiffies = jiffies_64;
 19#endif
 20
 21PHDRS {
 22	text PT_LOAD FLAGS(5);	/* R_E */
 23	data PT_LOAD FLAGS(7);	/* RWE */
 24	note PT_NOTE FLAGS(0);	/* ___ */
 25}
 26
 27SECTIONS
 28{
 29	. = 0x00000000;
 30	.text : {
 31	_text = .;		/* Text and read-only data */
 32		HEAD_TEXT
 33		TEXT_TEXT
 34		SCHED_TEXT
 35		LOCK_TEXT
 36		KPROBES_TEXT
 37		IRQENTRY_TEXT
 38		*(.fixup)
 39		*(.gnu.warning)
 40	} :text = 0x0700
 41
 42	_etext = .;		/* End of text section */
 43
 44	NOTES :text :note
 45
 46	.dummy : { *(.dummy) } :data
 47
 48	RO_DATA_SECTION(PAGE_SIZE)
 49
 50#ifdef CONFIG_SHARED_KERNEL
 51	. = ALIGN(0x100000);	/* VM shared segments are 1MB aligned */
 52#endif
 53
 54	. = ALIGN(PAGE_SIZE);
 55	_eshared = .;		/* End of shareable data */
 56	_sdata = .;		/* Start of data section */
 57
 58	EXCEPTION_TABLE(16) :data
 59
 60	RW_DATA_SECTION(0x100, PAGE_SIZE, THREAD_SIZE)
 61
 62	_edata = .;		/* End of data section */
 63
 64	/* will be freed after init */
 65	. = ALIGN(PAGE_SIZE);	/* Init code and data */
 66	__init_begin = .;
 67
 68	INIT_TEXT_SECTION(PAGE_SIZE)
 69
 70	/*
 71	 * .exit.text is discarded at runtime, not link time,
 72	 * to deal with references from __bug_table
 73	*/
 74	.exit.text : {
 75		EXIT_TEXT
 76	}
 77
 78	.exit.data : {
 79		EXIT_DATA
 80	}
 81
 82	/* early.c uses stsi, which requires page aligned data. */
 83	. = ALIGN(PAGE_SIZE);
 84	INIT_DATA_SECTION(0x100)
 85
 86	PERCPU_SECTION(0x100)
 87	. = ALIGN(PAGE_SIZE);
 88	__init_end = .;		/* freed after init ends here */
 89
 90	BSS_SECTION(0, 2, 0)
 91
 92	_end = . ;
 93
 94	/* Debugging sections.	*/
 95	STABS_DEBUG
 96	DWARF_DEBUG
 97
 98	/* Sections to be discarded */
 99	DISCARDS
100}