Commit d7e3b065 authored by Kees Cook's avatar Kees Cook Committed by Ingo Molnar

arm/build: Refactor linker script headers

In preparation for adding --orphan-handling=warn, refactor the linker
script header includes, and extract common macros.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Russell King <linux@armlinux.org.uk>
Link: https://lore.kernel.org/r/20200821194310.3089815-16-keescook@chromium.org
parent be288182
/* SPDX-License-Identifier: GPL-2.0 */ /* SPDX-License-Identifier: GPL-2.0 */
#include <asm-generic/vmlinux.lds.h>
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
#define ARM_CPU_DISCARD(x) #define ARM_CPU_DISCARD(x)
...@@ -49,8 +50,12 @@ ...@@ -49,8 +50,12 @@
EXIT_CALL \ EXIT_CALL \
ARM_MMU_DISCARD(*(.text.fixup)) \ ARM_MMU_DISCARD(*(.text.fixup)) \
ARM_MMU_DISCARD(*(__ex_table)) \ ARM_MMU_DISCARD(*(__ex_table)) \
*(.discard) \ COMMON_DISCARDS
*(.discard.*)
#define ARM_STUBS_TEXT \
*(.gnu.warning) \
*(.glue_7) \
*(.glue_7t)
#define ARM_TEXT \ #define ARM_TEXT \
IDMAP_TEXT \ IDMAP_TEXT \
...@@ -64,9 +69,7 @@ ...@@ -64,9 +69,7 @@
CPUIDLE_TEXT \ CPUIDLE_TEXT \
LOCK_TEXT \ LOCK_TEXT \
KPROBES_TEXT \ KPROBES_TEXT \
*(.gnu.warning) \ ARM_STUBS_TEXT \
*(.glue_7) \
*(.glue_7t) \
. = ALIGN(4); \ . = ALIGN(4); \
*(.got) /* Global offset table */ \ *(.got) /* Global offset table */ \
ARM_CPU_KEEP(PROC_INFO) ARM_CPU_KEEP(PROC_INFO)
......
...@@ -9,15 +9,13 @@ ...@@ -9,15 +9,13 @@
#include <linux/sizes.h> #include <linux/sizes.h>
#include <asm-generic/vmlinux.lds.h> #include <asm/vmlinux.lds.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/memory.h> #include <asm/memory.h>
#include <asm/mpu.h> #include <asm/mpu.h>
#include <asm/page.h> #include <asm/page.h>
#include "vmlinux.lds.h"
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(stext) ENTRY(stext)
......
...@@ -9,15 +9,13 @@ ...@@ -9,15 +9,13 @@
#else #else
#include <linux/pgtable.h> #include <linux/pgtable.h>
#include <asm-generic/vmlinux.lds.h> #include <asm/vmlinux.lds.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/memory.h> #include <asm/memory.h>
#include <asm/mpu.h> #include <asm/mpu.h>
#include <asm/page.h> #include <asm/page.h>
#include "vmlinux.lds.h"
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
ENTRY(stext) ENTRY(stext)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment