Skip to content
Snippets Groups Projects
Commit f01ec4fc authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'x86/build' into x86/asm, to pick up completed topic branch


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 45c08383 66584ea6
No related branches found
No related tags found
No related merge requests found
Showing
with 73 additions and 116 deletions
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#define EMITS_PT_NOTE
#define RO_EXCEPTION_TABLE_ALIGN 16
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/cache.h> #include <asm/cache.h>
...@@ -8,7 +12,7 @@ ...@@ -8,7 +12,7 @@
OUTPUT_FORMAT("elf64-alpha") OUTPUT_FORMAT("elf64-alpha")
OUTPUT_ARCH(alpha) OUTPUT_ARCH(alpha)
ENTRY(__start) ENTRY(__start)
PHDRS { kernel PT_LOAD; note PT_NOTE; } PHDRS { text PT_LOAD; note PT_NOTE; }
jiffies = jiffies_64; jiffies = jiffies_64;
SECTIONS SECTIONS
{ {
...@@ -27,17 +31,11 @@ SECTIONS ...@@ -27,17 +31,11 @@ SECTIONS
LOCK_TEXT LOCK_TEXT
*(.fixup) *(.fixup)
*(.gnu.warning) *(.gnu.warning)
} :kernel } :text
swapper_pg_dir = SWAPPER_PGD; swapper_pg_dir = SWAPPER_PGD;
_etext = .; /* End of text section */ _etext = .; /* End of text section */
NOTES :kernel :note RO_DATA(4096)
.dummy : {
*(.dummy)
} :kernel
RODATA
EXCEPTION_TABLE(16)
/* Will be freed after init */ /* Will be freed after init */
__init_begin = ALIGN(PAGE_SIZE); __init_begin = ALIGN(PAGE_SIZE);
...@@ -52,7 +50,7 @@ SECTIONS ...@@ -52,7 +50,7 @@ SECTIONS
_sdata = .; /* Start of rw data section */ _sdata = .; /* Start of rw data section */
_data = .; _data = .;
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
.got : { .got : {
*(.got) *(.got)
......
...@@ -95,13 +95,13 @@ SECTIONS ...@@ -95,13 +95,13 @@ SECTIONS
_etext = .; _etext = .;
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
/* /*
* 1. this is .data essentially * 1. this is .data essentially
* 2. THREAD_SIZE for init.task, must be kernel-stk sz aligned * 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 = .; _edata = .;
...@@ -118,8 +118,6 @@ SECTIONS ...@@ -118,8 +118,6 @@ SECTIONS
/DISCARD/ : { *(.eh_frame) } /DISCARD/ : { *(.eh_frame) }
#endif #endif
NOTES
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
_end = . ; _end = . ;
......
...@@ -70,8 +70,6 @@ SECTIONS ...@@ -70,8 +70,6 @@ SECTIONS
ARM_UNWIND_SECTIONS ARM_UNWIND_SECTIONS
#endif #endif
NOTES
_etext = .; /* End of text and rodata section */ _etext = .; /* End of text and rodata section */
ARM_VECTORS ARM_VECTORS
...@@ -114,7 +112,7 @@ SECTIONS ...@@ -114,7 +112,7 @@ SECTIONS
. = ALIGN(THREAD_SIZE); . = ALIGN(THREAD_SIZE);
_sdata = .; _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 : AT(ADDR(.data.ro_after_init) - LOAD_OFFSET) {
*(.data..ro_after_init) *(.data..ro_after_init)
} }
......
...@@ -81,8 +81,6 @@ SECTIONS ...@@ -81,8 +81,6 @@ SECTIONS
ARM_UNWIND_SECTIONS ARM_UNWIND_SECTIONS
#endif #endif
NOTES
#ifdef CONFIG_STRICT_KERNEL_RWX #ifdef CONFIG_STRICT_KERNEL_RWX
. = ALIGN(1<<SECTION_SHIFT); . = ALIGN(1<<SECTION_SHIFT);
#else #else
...@@ -143,7 +141,7 @@ SECTIONS ...@@ -143,7 +141,7 @@ SECTIONS
__init_end = .; __init_end = .;
_sdata = .; _sdata = .;
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
BSS_SECTION(0, 0, 0) BSS_SECTION(0, 0, 0)
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz> * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/ */
#define RO_EXCEPTION_TABLE_ALIGN 8
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/kernel-pgtable.h> #include <asm/kernel-pgtable.h>
...@@ -135,11 +137,9 @@ SECTIONS ...@@ -135,11 +137,9 @@ SECTIONS
. = ALIGN(SEGMENT_ALIGN); . = ALIGN(SEGMENT_ALIGN);
_etext = .; /* End of text section */ _etext = .; /* End of text section */
RO_DATA(PAGE_SIZE) /* everything from this point to */ /* everything from this point to __init_begin will be marked RO NX */
EXCEPTION_TABLE(8) /* __init_begin will be marked RO NX */ RO_DATA(PAGE_SIZE)
NOTES
. = ALIGN(PAGE_SIZE);
idmap_pg_dir = .; idmap_pg_dir = .;
. += IDMAP_DIR_SIZE; . += IDMAP_DIR_SIZE;
...@@ -215,7 +215,7 @@ SECTIONS ...@@ -215,7 +215,7 @@ SECTIONS
_data = .; _data = .;
_sdata = .; _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 * Data written with the MMU off but read with the MMU on requires
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
* Copyright (C) 2010, 2011 Texas Instruments Incorporated * Copyright (C) 2010, 2011 Texas Instruments Incorporated
* Mark Salter <msalter@redhat.com> * Mark Salter <msalter@redhat.com>
*/ */
#define RO_EXCEPTION_TABLE_ALIGN 16
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -80,10 +83,7 @@ SECTIONS ...@@ -80,10 +83,7 @@ SECTIONS
*(.gnu.warning) *(.gnu.warning)
} }
EXCEPTION_TABLE(16) RO_DATA(PAGE_SIZE)
NOTES
RO_DATA_SECTION(PAGE_SIZE)
.const : .const :
{ {
*(.const .const.* .gnu.linkonce.r.*) *(.const .const.* .gnu.linkonce.r.*)
......
...@@ -49,11 +49,10 @@ SECTIONS ...@@ -49,11 +49,10 @@ SECTIONS
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
NOTES
EXCEPTION_TABLE(L1_CACHE_BYTES) EXCEPTION_TABLE(L1_CACHE_BYTES)
BSS_SECTION(L1_CACHE_BYTES, PAGE_SIZE, L1_CACHE_BYTES) BSS_SECTION(L1_CACHE_BYTES, PAGE_SIZE, L1_CACHE_BYTES)
VBR_BASE VBR_BASE
......
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#define RO_EXCEPTION_TABLE_ALIGN 16
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
...@@ -37,9 +40,7 @@ SECTIONS ...@@ -37,9 +40,7 @@ SECTIONS
#endif #endif
_etext = . ; _etext = . ;
} }
EXCEPTION_TABLE(16) RO_DATA(4)
NOTES
RO_DATA_SECTION(4)
ROMEND = .; ROMEND = .;
#if defined(CONFIG_ROMKERNEL) #if defined(CONFIG_ROMKERNEL)
. = RAMTOP; . = RAMTOP;
...@@ -48,7 +49,7 @@ SECTIONS ...@@ -48,7 +49,7 @@ SECTIONS
#endif #endif
_sdata = . ; _sdata = . ;
__data_start = . ; __data_start = . ;
RW_DATA_SECTION(0, PAGE_SIZE, THREAD_SIZE) RW_DATA(0, PAGE_SIZE, THREAD_SIZE)
#if defined(CONFIG_ROMKERNEL) #if defined(CONFIG_ROMKERNEL)
#undef ADDR #undef ADDR
#endif #endif
......
...@@ -49,12 +49,11 @@ SECTIONS ...@@ -49,12 +49,11 @@ SECTIONS
INIT_DATA_SECTION(PAGE_SIZE) INIT_DATA_SECTION(PAGE_SIZE)
_sdata = .; _sdata = .;
RW_DATA_SECTION(32,PAGE_SIZE,_THREAD_SIZE) RW_DATA(32,PAGE_SIZE,_THREAD_SIZE)
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
_edata = .; _edata = .;
EXCEPTION_TABLE(16) EXCEPTION_TABLE(16)
NOTES
BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE) BSS_SECTION(_PAGE_SIZE, _PAGE_SIZE, _PAGE_SIZE)
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#define EMITS_PT_NOTE
#define RO_EXCEPTION_TABLE_ALIGN 16
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
OUTPUT_FORMAT("elf64-ia64-little") OUTPUT_FORMAT("elf64-ia64-little")
...@@ -13,7 +16,7 @@ ENTRY(phys_start) ...@@ -13,7 +16,7 @@ ENTRY(phys_start)
jiffies = jiffies_64; jiffies = jiffies_64;
PHDRS { PHDRS {
code PT_LOAD; text PT_LOAD;
percpu PT_LOAD; percpu PT_LOAD;
data PT_LOAD; data PT_LOAD;
note PT_NOTE; note PT_NOTE;
...@@ -36,7 +39,7 @@ SECTIONS { ...@@ -36,7 +39,7 @@ SECTIONS {
phys_start = _start - LOAD_OFFSET; phys_start = _start - LOAD_OFFSET;
code : { code : {
} :code } :text
. = KERNEL_START; . = KERNEL_START;
_text = .; _text = .;
...@@ -68,11 +71,6 @@ SECTIONS { ...@@ -68,11 +71,6 @@ SECTIONS {
/* /*
* Read-only data * 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 */ /* MCA table */
. = ALIGN(16); . = ALIGN(16);
...@@ -102,11 +100,11 @@ SECTIONS { ...@@ -102,11 +100,11 @@ SECTIONS {
__start_unwind = .; __start_unwind = .;
*(.IA_64.unwind*) *(.IA_64.unwind*)
__end_unwind = .; __end_unwind = .;
} :code :unwind } :text :unwind
code_continues2 : { code_continues2 : {
} : code } :text
RODATA RO_DATA(4096)
.opd : AT(ADDR(.opd) - LOAD_OFFSET) { .opd : AT(ADDR(.opd) - LOAD_OFFSET) {
__start_opd = .; __start_opd = .;
...@@ -214,7 +212,7 @@ SECTIONS { ...@@ -214,7 +212,7 @@ SECTIONS {
_end = .; _end = .;
code : { code : {
} :code } :text
STABS_DEBUG STABS_DEBUG
DWARF_DEBUG DWARF_DEBUG
......
...@@ -60,8 +60,8 @@ SECTIONS { ...@@ -60,8 +60,8 @@ SECTIONS {
#endif #endif
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) RW_DATA(16, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
EXCEPTION_TABLE(16) EXCEPTION_TABLE(16)
......
...@@ -31,9 +31,9 @@ SECTIONS ...@@ -31,9 +31,9 @@ SECTIONS
_sdata = .; /* Start of data section */ _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) BSS_SECTION(0, 0, 0)
......
...@@ -24,13 +24,13 @@ SECTIONS ...@@ -24,13 +24,13 @@ SECTIONS
*(.fixup) *(.fixup)
*(.gnu.warning) *(.gnu.warning)
} :text = 0x4e75 } :text = 0x4e75
RODATA RO_DATA(4096)
_etext = .; /* End of text section */ _etext = .; /* End of text section */
EXCEPTION_TABLE(16) :data EXCEPTION_TABLE(16) :data
_sdata = .; /* Start of rw data section */ _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. */ /* End of data goes *here* so that freeing init code works properly. */
_edata = .; _edata = .;
NOTES NOTES
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
OUTPUT_ARCH(microblaze) OUTPUT_ARCH(microblaze)
ENTRY(microblaze_start) ENTRY(microblaze_start)
#define RO_EXCEPTION_TABLE_ALIGN 16
#include <asm/page.h> #include <asm/page.h>
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
...@@ -51,9 +53,7 @@ SECTIONS { ...@@ -51,9 +53,7 @@ SECTIONS {
} }
. = ALIGN(16); . = ALIGN(16);
RODATA RO_DATA(4096)
EXCEPTION_TABLE(16)
NOTES
/* /*
* sdata2 section can go anywhere, but must be word aligned * sdata2 section can go anywhere, but must be word aligned
...@@ -70,7 +70,7 @@ SECTIONS { ...@@ -70,7 +70,7 @@ SECTIONS {
} }
_sdata = . ; _sdata = . ;
RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) RW_DATA(32, PAGE_SIZE, THREAD_SIZE)
_edata = . ; _edata = . ;
/* Under the microblaze ABI, .sdata and .sbss must be contiguous */ /* Under the microblaze ABI, .sdata and .sbss must be contiguous */
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
*/ */
#define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir) #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> #include <asm-generic/vmlinux.lds.h>
#undef mips #undef mips
...@@ -76,16 +81,8 @@ SECTIONS ...@@ -76,16 +81,8 @@ SECTIONS
__stop___dbe_table = .; __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 */ _sdata = .; /* Start of data section */
RODATA RO_DATA(4096)
/* writeable */ /* writeable */
.data : { /* Data */ .data : { /* Data */
......
...@@ -53,12 +53,11 @@ SECTIONS ...@@ -53,12 +53,11 @@ SECTIONS
_etext = .; /* End of text and rodata section */ _etext = .; /* End of text and rodata section */
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
EXCEPTION_TABLE(16) EXCEPTION_TABLE(16)
NOTES
BSS_SECTION(4, 4, 4) BSS_SECTION(4, 4, 4)
_end = .; _end = .;
......
...@@ -49,8 +49,8 @@ SECTIONS ...@@ -49,8 +49,8 @@ SECTIONS
__init_end = .; __init_end = .;
_sdata = .; _sdata = .;
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
_edata = .; _edata = .;
BSS_SECTION(0, 0, 0) BSS_SECTION(0, 0, 0)
...@@ -58,7 +58,6 @@ SECTIONS ...@@ -58,7 +58,6 @@ SECTIONS
STABS_DEBUG STABS_DEBUG
DWARF_DEBUG DWARF_DEBUG
NOTES
DISCARDS DISCARDS
} }
...@@ -67,19 +67,18 @@ SECTIONS ...@@ -67,19 +67,18 @@ SECTIONS
_sdata = .; _sdata = .;
/* Page alignment required for RO_DATA_SECTION */ /* Page alignment required for RO_DATA */
RO_DATA_SECTION(PAGE_SIZE) RO_DATA(PAGE_SIZE)
_e_kernel_ro = .; _e_kernel_ro = .;
/* Whatever comes after _e_kernel_ro had better be page-aligend, too */ /* Whatever comes after _e_kernel_ro had better be page-aligend, too */
/* 32 here is cacheline size... recheck this */ /* 32 here is cacheline size... recheck this */
RW_DATA_SECTION(32, PAGE_SIZE, PAGE_SIZE) RW_DATA(32, PAGE_SIZE, PAGE_SIZE)
_edata = .; _edata = .;
EXCEPTION_TABLE(4) EXCEPTION_TABLE(4)
NOTES
/* Init code and data */ /* Init code and data */
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
*(.data..vm0.pte) *(.data..vm0.pte)
#define CC_USING_PATCHABLE_FUNCTION_ENTRY #define CC_USING_PATCHABLE_FUNCTION_ENTRY
#define RO_EXCEPTION_TABLE_ALIGN 8
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
...@@ -109,7 +110,7 @@ SECTIONS ...@@ -109,7 +110,7 @@ SECTIONS
_sdata = .; _sdata = .;
/* Architecturally we need to keep __gp below 0x1000000 and thus /* Architecturally we need to keep __gp below 0x1000000 and thus
* in front of RO_DATA_SECTION() which stores lots of tracepoint * in front of RO_DATA() which stores lots of tracepoint
* and ftrace symbols. */ * and ftrace symbols. */
#ifdef CONFIG_64BIT #ifdef CONFIG_64BIT
. = ALIGN(16); . = ALIGN(16);
...@@ -127,11 +128,7 @@ SECTIONS ...@@ -127,11 +128,7 @@ SECTIONS
} }
#endif #endif
RO_DATA_SECTION(8) RO_DATA(8)
/* RO because of BUILDTIME_EXTABLE_SORT */
EXCEPTION_TABLE(8)
NOTES
/* unwind info */ /* unwind info */
.PARISC.unwind : { .PARISC.unwind : {
...@@ -149,7 +146,7 @@ SECTIONS ...@@ -149,7 +146,7 @@ SECTIONS
data_start = .; data_start = .;
/* Data */ /* Data */
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE) RW_DATA(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
/* PA-RISC locks requires 16-byte alignment */ /* PA-RISC locks requires 16-byte alignment */
. = ALIGN(16); . = ALIGN(16);
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#endif #endif
#define BSS_FIRST_SECTIONS *(.bss.prominit) #define BSS_FIRST_SECTIONS *(.bss.prominit)
#define EMITS_PT_NOTE
#define RO_EXCEPTION_TABLE_ALIGN 0
#include <asm/page.h> #include <asm/page.h>
#include <asm-generic/vmlinux.lds.h> #include <asm-generic/vmlinux.lds.h>
...@@ -18,22 +20,8 @@ ...@@ -18,22 +20,8 @@
ENTRY(_stext) ENTRY(_stext)
PHDRS { PHDRS {
kernel PT_LOAD FLAGS(7); /* RWX */ text PT_LOAD FLAGS(7); /* RWX */
notes PT_NOTE FLAGS(0); note PT_NOTE FLAGS(0);
dummy PT_NOTE FLAGS(0);
/* binutils < 2.18 has a bug that makes it misbehave when taking an
ELF file with all segments at load address 0 as input. This
happens when running "strip" on vmlinux, because of the AT() magic
in this linker script. People using GCC >= 4.2 won't run into
this problem, because the "build-id" support will put some data
into the "notes" segment (at a non-zero load address).
To work around this, we force some data into both the "dummy"
segment and the kernel segment, so the dummy segment will get a
non-zero load address. It's not enough to always create the
"notes" segment, since if nothing gets assigned to it, its load
address will be zero. */
} }
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
...@@ -77,7 +65,7 @@ SECTIONS ...@@ -77,7 +65,7 @@ SECTIONS
#else /* !CONFIG_PPC64 */ #else /* !CONFIG_PPC64 */
HEAD_TEXT HEAD_TEXT
#endif #endif
} :kernel } :text
__head_end = .; __head_end = .;
...@@ -126,7 +114,7 @@ SECTIONS ...@@ -126,7 +114,7 @@ SECTIONS
__got2_end = .; __got2_end = .;
#endif /* CONFIG_PPC32 */ #endif /* CONFIG_PPC32 */
} :kernel } :text
. = ALIGN(ETEXT_ALIGN_SIZE); . = ALIGN(ETEXT_ALIGN_SIZE);
_etext = .; _etext = .;
...@@ -175,17 +163,6 @@ SECTIONS ...@@ -175,17 +163,6 @@ SECTIONS
__stop__btb_flush_fixup = .; __stop__btb_flush_fixup = .;
} }
#endif #endif
EXCEPTION_TABLE(0)
NOTES :kernel :notes
/* The dummy segment contents for the bug workaround mentioned above
near PHDRS. */
.dummy : AT(ADDR(.dummy) - LOAD_OFFSET) {
LONG(0)
LONG(0)
LONG(0)
} :kernel :dummy
/* /*
* Init sections discarded at runtime * Init sections discarded at runtime
...@@ -200,7 +177,7 @@ SECTIONS ...@@ -200,7 +177,7 @@ SECTIONS
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
*(.tramp.ftrace.init); *(.tramp.ftrace.init);
#endif #endif
} :kernel } :text
/* .exit.text is discarded at runtime, not link time, /* .exit.text is discarded at runtime, not link time,
* to deal with references from __bug_table * to deal with references from __bug_table
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment