mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 16:08:58 +07:00
1e51cd5388
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Mark Salter <msalter@redhat.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Rick Edgecombe <rick.p.edgecombe@intel.com> Cc: Segher Boessenkool <segher@kernel.crashing.org> Cc: Will Deacon <will@kernel.org> Cc: x86-ml <x86@kernel.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Link: https://lkml.kernel.org/r/20191029211351.13243-20-keescook@chromium.org
152 lines
2.2 KiB
ArmAsm
152 lines
2.2 KiB
ArmAsm
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* ld script for the c6x kernel
|
|
*
|
|
* 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>
|
|
|
|
ENTRY(_c_int00)
|
|
|
|
#if defined(CONFIG_CPU_BIG_ENDIAN)
|
|
jiffies = jiffies_64 + 4;
|
|
#else
|
|
jiffies = jiffies_64;
|
|
#endif
|
|
|
|
#define READONLY_SEGMENT_START \
|
|
. = PAGE_OFFSET;
|
|
#define READWRITE_SEGMENT_START \
|
|
. = ALIGN(128); \
|
|
_data_lma = .;
|
|
|
|
SECTIONS
|
|
{
|
|
/*
|
|
* Start kernel read only segment
|
|
*/
|
|
READONLY_SEGMENT_START
|
|
|
|
.vectors :
|
|
{
|
|
_vectors_start = .;
|
|
*(.vectors)
|
|
. = ALIGN(0x400);
|
|
_vectors_end = .;
|
|
}
|
|
|
|
/*
|
|
* This section contains data which may be shared with other
|
|
* cores. It needs to be a fixed offset from PAGE_OFFSET
|
|
* regardless of kernel configuration.
|
|
*/
|
|
.virtio_ipc_dev :
|
|
{
|
|
*(.virtio_ipc_dev)
|
|
}
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
__init_begin = .;
|
|
.init :
|
|
{
|
|
_sinittext = .;
|
|
HEAD_TEXT
|
|
INIT_TEXT
|
|
_einittext = .;
|
|
}
|
|
|
|
INIT_DATA_SECTION(16)
|
|
|
|
PERCPU_SECTION(128)
|
|
|
|
. = ALIGN(PAGE_SIZE);
|
|
__init_end = .;
|
|
|
|
.text :
|
|
{
|
|
_text = .;
|
|
_stext = .;
|
|
TEXT_TEXT
|
|
SCHED_TEXT
|
|
CPUIDLE_TEXT
|
|
LOCK_TEXT
|
|
IRQENTRY_TEXT
|
|
SOFTIRQENTRY_TEXT
|
|
KPROBES_TEXT
|
|
*(.fixup)
|
|
*(.gnu.warning)
|
|
}
|
|
|
|
RO_DATA(PAGE_SIZE)
|
|
.const :
|
|
{
|
|
*(.const .const.* .gnu.linkonce.r.*)
|
|
*(.switch)
|
|
}
|
|
|
|
_etext = .;
|
|
|
|
/*
|
|
* Start kernel read-write segment.
|
|
*/
|
|
READWRITE_SEGMENT_START
|
|
_sdata = .;
|
|
|
|
.fardata : AT(ADDR(.fardata) - LOAD_OFFSET)
|
|
{
|
|
INIT_TASK_DATA(THREAD_SIZE)
|
|
NOSAVE_DATA
|
|
PAGE_ALIGNED_DATA(PAGE_SIZE)
|
|
CACHELINE_ALIGNED_DATA(128)
|
|
READ_MOSTLY_DATA(128)
|
|
DATA_DATA
|
|
CONSTRUCTORS
|
|
*(.data1)
|
|
*(.fardata .fardata.*)
|
|
*(.data.debug_bpt)
|
|
}
|
|
|
|
.neardata ALIGN(8) : AT(ADDR(.neardata) - LOAD_OFFSET)
|
|
{
|
|
*(.neardata2 .neardata2.* .gnu.linkonce.s2.*)
|
|
*(.neardata .neardata.* .gnu.linkonce.s.*)
|
|
. = ALIGN(8);
|
|
}
|
|
|
|
BUG_TABLE
|
|
|
|
_edata = .;
|
|
|
|
__bss_start = .;
|
|
SBSS(8)
|
|
BSS(8)
|
|
.far :
|
|
{
|
|
. = ALIGN(8);
|
|
*(.dynfar)
|
|
*(.far .far.* .gnu.linkonce.b.*)
|
|
. = ALIGN(8);
|
|
}
|
|
__bss_stop = .;
|
|
|
|
_end = .;
|
|
|
|
DWARF_DEBUG
|
|
|
|
/DISCARD/ :
|
|
{
|
|
EXIT_TEXT
|
|
EXIT_DATA
|
|
EXIT_CALL
|
|
*(.discard)
|
|
*(.discard.*)
|
|
*(.interp)
|
|
}
|
|
}
|