Skip to content

Commit

Permalink
Merge branch 'x86/build' into core/kprobes, to pick up dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Nov 15, 2019
2 parents 96b95ef + de71566 commit 2daafcd
Show file tree
Hide file tree
Showing 37 changed files with 163 additions and 177 deletions.
18 changes: 8 additions & 10 deletions arch/alpha/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0 */

#define EMITS_PT_NOTE
#define RO_EXCEPTION_TABLE_ALIGN 16

#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
#include <asm/cache.h>
Expand All @@ -8,7 +12,7 @@
OUTPUT_FORMAT("elf64-alpha")
OUTPUT_ARCH(alpha)
ENTRY(__start)
PHDRS { kernel PT_LOAD; note PT_NOTE; }
PHDRS { text PT_LOAD; note PT_NOTE; }
jiffies = jiffies_64;
SECTIONS
{
Expand All @@ -27,17 +31,11 @@ SECTIONS
LOCK_TEXT
*(.fixup)
*(.gnu.warning)
} :kernel
} :text
swapper_pg_dir = SWAPPER_PGD;
_etext = .; /* End of text section */

NOTES :kernel :note
.dummy : {
*(.dummy)
} :kernel

RODATA
EXCEPTION_TABLE(16)
RO_DATA(4096)

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

_sdata = .; /* Start of rw data section */
_data = .;
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)

.got : {
*(.got)
Expand Down
6 changes: 2 additions & 4 deletions arch/arc/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ SECTIONS
_etext = .;

_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)

/*
* 1. this is .data essentially
* 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned
*/
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)

_edata = .;

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

NOTES

. = ALIGN(PAGE_SIZE);
_end = . ;

Expand Down
4 changes: 1 addition & 3 deletions arch/arm/kernel/vmlinux-xip.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ SECTIONS
ARM_UNWIND_SECTIONS
#endif

NOTES

_etext = .; /* End of text and rodata section */

ARM_VECTORS
Expand Down Expand Up @@ -114,7 +112,7 @@ SECTIONS

. = ALIGN(THREAD_SIZE);
_sdata = .;
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
.data.ro_after_init : AT(ADDR(.data.ro_after_init) - LOAD_OFFSET) {
*(.data..ro_after_init)
}
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ SECTIONS
ARM_UNWIND_SECTIONS
#endif

NOTES

#ifdef CONFIG_STRICT_KERNEL_RWX
. = ALIGN(1<<SECTION_SHIFT);
#else
Expand Down Expand Up @@ -143,7 +141,7 @@ SECTIONS
__init_end = .;

_sdata = .;
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .;

BSS_SECTION(0, 0, 0)
Expand Down
10 changes: 5 additions & 5 deletions arch/arm64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/

#define RO_EXCEPTION_TABLE_ALIGN 8

#include <asm-generic/vmlinux.lds.h>
#include <asm/cache.h>
#include <asm/kernel-pgtable.h>
Expand Down Expand Up @@ -135,11 +137,9 @@ SECTIONS
. = ALIGN(SEGMENT_ALIGN);
_etext = .; /* End of text section */

RO_DATA(PAGE_SIZE) /* everything from this point to */
EXCEPTION_TABLE(8) /* __init_begin will be marked RO NX */
NOTES
/* everything from this point to __init_begin will be marked RO NX */
RO_DATA(PAGE_SIZE)

. = ALIGN(PAGE_SIZE);
idmap_pg_dir = .;
. += IDMAP_DIR_SIZE;

Expand Down Expand Up @@ -215,7 +215,7 @@ SECTIONS

_data = .;
_sdata = .;
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_ALIGN)

/*
* Data written with the MMU off but read with the MMU on requires
Expand Down
8 changes: 4 additions & 4 deletions arch/c6x/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* Copyright (C) 2010, 2011 Texas Instruments Incorporated
* Mark Salter <msalter@redhat.com>
*/

#define RO_EXCEPTION_TABLE_ALIGN 16

#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
#include <asm/page.h>
Expand Down Expand Up @@ -80,10 +83,7 @@ SECTIONS
*(.gnu.warning)
}

EXCEPTION_TABLE(16)
NOTES

RO_DATA_SECTION(PAGE_SIZE)
RO_DATA(PAGE_SIZE)
.const :
{
*(.const .const.* .gnu.linkonce.r.*)
Expand Down
5 changes: 2 additions & 3 deletions arch/csky/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,10 @@ SECTIONS


_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
RO_DATA(PAGE_SIZE)
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .;

NOTES
EXCEPTION_TABLE(L1_CACHE_BYTES)
BSS_SECTION(L1_CACHE_BYTES, PAGE_SIZE, L1_CACHE_BYTES)
VBR_BASE
Expand Down
9 changes: 5 additions & 4 deletions arch/h8300/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */

#define RO_EXCEPTION_TABLE_ALIGN 16

#include <asm-generic/vmlinux.lds.h>
#include <asm/page.h>
#include <asm/thread_info.h>
Expand Down Expand Up @@ -37,9 +40,7 @@ SECTIONS
#endif
_etext = . ;
}
EXCEPTION_TABLE(16)
NOTES
RO_DATA_SECTION(4)
RO_DATA(4)
ROMEND = .;
#if defined(CONFIG_ROMKERNEL)
. = RAMTOP;
Expand All @@ -48,7 +49,7 @@ SECTIONS
#endif
_sdata = . ;
__data_start = . ;
RW_DATA_SECTION(0, PAGE_SIZE, THREAD_SIZE)
RW_DATA(0, PAGE_SIZE, THREAD_SIZE)
#if defined(CONFIG_ROMKERNEL)
#undef ADDR
#endif
Expand Down
5 changes: 2 additions & 3 deletions arch/hexagon/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ SECTIONS
INIT_DATA_SECTION(PAGE_SIZE)

_sdata = .;
RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE)
RO_DATA_SECTION(PAGE_SIZE)
RW_DATA(32,PAGE_SIZE,_THREAD_SIZE)
RO_DATA(PAGE_SIZE)
_edata = .;

EXCEPTION_TABLE(16)
NOTES

BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE)

Expand Down
20 changes: 9 additions & 11 deletions arch/ia64/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <asm/pgtable.h>
#include <asm/thread_info.h>

#define EMITS_PT_NOTE
#define RO_EXCEPTION_TABLE_ALIGN 16

#include <asm-generic/vmlinux.lds.h>

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

PHDRS {
code PT_LOAD;
text PT_LOAD;
percpu PT_LOAD;
data PT_LOAD;
note PT_NOTE;
Expand All @@ -36,7 +39,7 @@ SECTIONS {
phys_start = _start - LOAD_OFFSET;

code : {
} :code
} :text
. = KERNEL_START;

_text = .;
Expand Down Expand Up @@ -68,11 +71,6 @@ SECTIONS {
/*
* Read-only data
*/
NOTES :code :note /* put .notes in text and mark in PT_NOTE */
code_continues : {
} : code /* switch back to regular program... */

EXCEPTION_TABLE(16)

/* MCA table */
. = ALIGN(16);
Expand Down Expand Up @@ -102,11 +100,11 @@ SECTIONS {
__start_unwind = .;
*(.IA_64.unwind*)
__end_unwind = .;
} :code :unwind
} :text :unwind
code_continues2 : {
} : code
} :text

RODATA
RO_DATA(4096)

.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
__start_opd = .;
Expand Down Expand Up @@ -214,7 +212,7 @@ SECTIONS {
_end = .;

code : {
} :code
} :text

STABS_DEBUG
DWARF_DEBUG
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/kernel/vmlinux-nommu.lds
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ SECTIONS {
#endif

_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
RO_DATA(PAGE_SIZE)
RW_DATA(16, PAGE_SIZE, THREAD_SIZE)
_edata = .;

EXCEPTION_TABLE(16)
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/kernel/vmlinux-std.lds
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ SECTIONS

_sdata = .; /* Start of data section */

RODATA
RO_DATA(4096)

RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
RW_DATA(16, PAGE_SIZE, THREAD_SIZE)

BSS_SECTION(0, 0, 0)

Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/kernel/vmlinux-sun3.lds
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ SECTIONS
*(.fixup)
*(.gnu.warning)
} :text = 0x4e75
RODATA
RO_DATA(4096)

_etext = .; /* End of text section */

EXCEPTION_TABLE(16) :data
_sdata = .; /* Start of rw data section */
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) :data
RW_DATA(16, PAGE_SIZE, THREAD_SIZE) :data
/* End of data goes *here* so that freeing init code works properly. */
_edata = .;
NOTES
Expand Down
8 changes: 4 additions & 4 deletions arch/microblaze/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
OUTPUT_ARCH(microblaze)
ENTRY(microblaze_start)

#define RO_EXCEPTION_TABLE_ALIGN 16

#include <asm/page.h>
#include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h>
Expand Down Expand Up @@ -51,9 +53,7 @@ SECTIONS {
}

. = ALIGN(16);
RODATA
EXCEPTION_TABLE(16)
NOTES
RO_DATA(4096)

/*
* sdata2 section can go anywhere, but must be word aligned
Expand All @@ -70,7 +70,7 @@ SECTIONS {
}

_sdata = . ;
RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
RW_DATA(32, PAGE_SIZE, THREAD_SIZE)
_edata = . ;

/* Under the microblaze ABI, .sdata and .sbss must be contiguous */
Expand Down
15 changes: 6 additions & 9 deletions arch/mips/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
*/
#define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir)

/* Cavium Octeon should not have a separate PT_NOTE Program Header. */
#ifndef CONFIG_CAVIUM_OCTEON_SOC
#define EMITS_PT_NOTE
#endif

#include <asm-generic/vmlinux.lds.h>

#undef mips
Expand Down Expand Up @@ -76,16 +81,8 @@ SECTIONS
__stop___dbe_table = .;
}

#ifdef CONFIG_CAVIUM_OCTEON_SOC
#define NOTES_HEADER
#else /* CONFIG_CAVIUM_OCTEON_SOC */
#define NOTES_HEADER :note
#endif /* CONFIG_CAVIUM_OCTEON_SOC */
NOTES :text NOTES_HEADER
.dummy : { *(.dummy) } :text

_sdata = .; /* Start of data section */
RODATA
RO_DATA(4096)

/* writeable */
.data : { /* Data */
Expand Down
5 changes: 2 additions & 3 deletions arch/nds32/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ SECTIONS
_etext = .; /* End of text and rodata section */

_sdata = .;
RO_DATA_SECTION(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
RO_DATA(PAGE_SIZE)
RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .;

EXCEPTION_TABLE(16)
NOTES
BSS_SECTION(4, 4, 4)
_end = .;

Expand Down
Loading

0 comments on commit 2daafcd

Please sign in to comment.