Skip to content

Commit f01ec4f

Browse files
author
Ingo Molnar
committed
Merge branch 'x86/build' into x86/asm, to pick up completed topic branch
Signed-off-by: Ingo Molnar <[email protected]>
2 parents 45c0838 + 66584ea commit f01ec4f

File tree

38 files changed

+163
-179
lines changed

38 files changed

+163
-179
lines changed

arch/alpha/kernel/vmlinux.lds.S

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#define EMITS_PT_NOTE
4+
#define RO_EXCEPTION_TABLE_ALIGN 16
5+
26
#include <asm-generic/vmlinux.lds.h>
37
#include <asm/thread_info.h>
48
#include <asm/cache.h>
@@ -8,7 +12,7 @@
812
OUTPUT_FORMAT("elf64-alpha")
913
OUTPUT_ARCH(alpha)
1014
ENTRY(__start)
11-
PHDRS { kernel PT_LOAD; note PT_NOTE; }
15+
PHDRS { text PT_LOAD; note PT_NOTE; }
1216
jiffies = jiffies_64;
1317
SECTIONS
1418
{
@@ -27,17 +31,11 @@ SECTIONS
2731
LOCK_TEXT
2832
*(.fixup)
2933
*(.gnu.warning)
30-
} :kernel
34+
} :text
3135
swapper_pg_dir = SWAPPER_PGD;
3236
_etext = .; /* End of text section */
3337

34-
NOTES :kernel :note
35-
.dummy : {
36-
*(.dummy)
37-
} :kernel
38-
39-
RODATA
40-
EXCEPTION_TABLE(16)
38+
RO_DATA(4096)
4139

4240
/* Will be freed after init */
4341
__init_begin = ALIGN(PAGE_SIZE);
@@ -52,7 +50,7 @@ SECTIONS
5250

5351
_sdata = .; /* Start of rw data section */
5452
_data = .;
55-
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
53+
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
5654

5755
.got : {
5856
*(.got)

arch/arc/kernel/vmlinux.lds.S

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ SECTIONS
9595
_etext = .;
9696

9797
_sdata = .;
98-
RO_DATA_SECTION(PAGE_SIZE)
98+
RO_DATA(PAGE_SIZE)
9999

100100
/*
101101
* 1. this is .data essentially
102102
* 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned
103103
*/
104-
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
104+
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
105105

106106
_edata = .;
107107

@@ -118,8 +118,6 @@ SECTIONS
118118
/DISCARD/ : { *(.eh_frame) }
119119
#endif
120120

121-
NOTES
122-
123121
. = ALIGN(PAGE_SIZE);
124122
_end = . ;
125123

arch/arm/kernel/vmlinux-xip.lds.S

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ SECTIONS
7070
ARM_UNWIND_SECTIONS
7171
#endif
7272

73-
NOTES
74-
7573
_etext = .; /* End of text and rodata section */
7674

7775
ARM_VECTORS
@@ -114,7 +112,7 @@ SECTIONS
114112

115113
. = ALIGN(THREAD_SIZE);
116114
_sdata = .;
117-
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
115+
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
118116
.data.ro_after_init : AT(ADDR(.data.ro_after_init) - LOAD_OFFSET) {
119117
*(.data..ro_after_init)
120118
}

arch/arm/kernel/vmlinux.lds.S

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ SECTIONS
8181
ARM_UNWIND_SECTIONS
8282
#endif
8383

84-
NOTES
85-
8684
#ifdef CONFIG_STRICT_KERNEL_RWX
8785
. = ALIGN(1<<SECTION_SHIFT);
8886
#else
@@ -143,7 +141,7 @@ SECTIONS
143141
__init_end = .;
144142

145143
_sdata = .;
146-
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
144+
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
147145
_edata = .;
148146

149147
BSS_SECTION(0, 0, 0)

arch/arm64/kernel/vmlinux.lds.S

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Written by Martin Mares <[email protected]>
66
*/
77

8+
#define RO_EXCEPTION_TABLE_ALIGN 8
9+
810
#include <asm-generic/vmlinux.lds.h>
911
#include <asm/cache.h>
1012
#include <asm/kernel-pgtable.h>
@@ -135,11 +137,9 @@ SECTIONS
135137
. = ALIGN(SEGMENT_ALIGN);
136138
_etext = .; /* End of text section */
137139

138-
RO_DATA(PAGE_SIZE) /* everything from this point to */
139-
EXCEPTION_TABLE(8) /* __init_begin will be marked RO NX */
140-
NOTES
140+
/* everything from this point to __init_begin will be marked RO NX */
141+
RO_DATA(PAGE_SIZE)
141142

142-
. = ALIGN(PAGE_SIZE);
143143
idmap_pg_dir = .;
144144
. += IDMAP_DIR_SIZE;
145145

@@ -215,7 +215,7 @@ SECTIONS
215215

216216
_data = .;
217217
_sdata = .;
218-
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
218+
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
219219

220220
/*
221221
* Data written with the MMU off but read with the MMU on requires

arch/c6x/kernel/vmlinux.lds.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* Copyright (C) 2010, 2011 Texas Instruments Incorporated
66
* Mark Salter <[email protected]>
77
*/
8+
9+
#define RO_EXCEPTION_TABLE_ALIGN 16
10+
811
#include <asm-generic/vmlinux.lds.h>
912
#include <asm/thread_info.h>
1013
#include <asm/page.h>
@@ -80,10 +83,7 @@ SECTIONS
8083
*(.gnu.warning)
8184
}
8285

83-
EXCEPTION_TABLE(16)
84-
NOTES
85-
86-
RO_DATA_SECTION(PAGE_SIZE)
86+
RO_DATA(PAGE_SIZE)
8787
.const :
8888
{
8989
*(.const .const.* .gnu.linkonce.r.*)

arch/csky/kernel/vmlinux.lds.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ SECTIONS
4949

5050

5151
_sdata = .;
52-
RO_DATA_SECTION(PAGE_SIZE)
53-
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
52+
RO_DATA(PAGE_SIZE)
53+
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
5454
_edata = .;
5555

56-
NOTES
5756
EXCEPTION_TABLE(L1_CACHE_BYTES)
5857
BSS_SECTION(L1_CACHE_BYTES, PAGE_SIZE, L1_CACHE_BYTES)
5958
VBR_BASE

arch/h8300/kernel/vmlinux.lds.S

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
#define RO_EXCEPTION_TABLE_ALIGN 16
4+
25
#include <asm-generic/vmlinux.lds.h>
36
#include <asm/page.h>
47
#include <asm/thread_info.h>
@@ -37,9 +40,7 @@ SECTIONS
3740
#endif
3841
_etext = . ;
3942
}
40-
EXCEPTION_TABLE(16)
41-
NOTES
42-
RO_DATA_SECTION(4)
43+
RO_DATA(4)
4344
ROMEND = .;
4445
#if defined(CONFIG_ROMKERNEL)
4546
. = RAMTOP;
@@ -48,7 +49,7 @@ SECTIONS
4849
#endif
4950
_sdata = . ;
5051
__data_start = . ;
51-
RW_DATA_SECTION(0, PAGE_SIZE, THREAD_SIZE)
52+
RW_DATA(0, PAGE_SIZE, THREAD_SIZE)
5253
#if defined(CONFIG_ROMKERNEL)
5354
#undef ADDR
5455
#endif

arch/hexagon/kernel/vmlinux.lds.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ SECTIONS
4949
INIT_DATA_SECTION(PAGE_SIZE)
5050

5151
_sdata = .;
52-
RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
53-
RO_DATA_SECTION(PAGE_SIZE)
52+
RW_DATA(32,PAGE_SIZE,_THREAD_SIZE)
53+
RO_DATA(PAGE_SIZE)
5454
_edata = .;
5555

5656
EXCEPTION_TABLE(16)
57-
NOTES
5857

5958
BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE)
6059

arch/ia64/kernel/vmlinux.lds.S

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
#include <asm/pgtable.h>
66
#include <asm/thread_info.h>
77

8+
#define EMITS_PT_NOTE
9+
#define RO_EXCEPTION_TABLE_ALIGN 16
10+
811
#include <asm-generic/vmlinux.lds.h>
912

1013
OUTPUT_FORMAT("elf64-ia64-little")
@@ -13,7 +16,7 @@ ENTRY(phys_start)
1316
jiffies = jiffies_64;
1417

1518
PHDRS {
16-
code PT_LOAD;
19+
text PT_LOAD;
1720
percpu PT_LOAD;
1821
data PT_LOAD;
1922
note PT_NOTE;
@@ -36,7 +39,7 @@ SECTIONS {
3639
phys_start = _start - LOAD_OFFSET;
3740

3841
code : {
39-
} :code
42+
} :text
4043
. = KERNEL_START;
4144

4245
_text = .;
@@ -68,11 +71,6 @@ SECTIONS {
6871
/*
6972
* Read-only data
7073
*/
71-
NOTES :code :note /* put .notes in text and mark in PT_NOTE */
72-
code_continues : {
73-
} : code /* switch back to regular program... */
74-
75-
EXCEPTION_TABLE(16)
7674

7775
/* MCA table */
7876
. = ALIGN(16);
@@ -102,11 +100,11 @@ SECTIONS {
102100
__start_unwind = .;
103101
*(.IA_64.unwind*)
104102
__end_unwind = .;
105-
} :code :unwind
103+
} :text :unwind
106104
code_continues2 : {
107-
} : code
105+
} :text
108106

109-
RODATA
107+
RO_DATA(4096)
110108

111109
.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
112110
__start_opd = .;
@@ -214,7 +212,7 @@ SECTIONS {
214212
_end = .;
215213

216214
code : {
217-
} :code
215+
} :text
218216

219217
STABS_DEBUG
220218
DWARF_DEBUG

0 commit comments

Comments
 (0)