summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-10-10 08:11:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-10-11 16:46:25 +0200
commit97e721a5d6a94422115bcce6bf2d8e822284212f (patch)
treebac95f25f5213906d63b3f18cdad52e0cdd8bd47 /arch/mips
parenta857444f4326491297163ba7e53ca98fde2988d4 (diff)
downloadbarebox-97e721a5d6a94422115bcce6bf2d8e822284212f.tar.gz
lds: move OUTPUT_FORMAT/ARCH definition into header
In order to allow us having architecture-indepenent linker scripts, move the definition for the format and the architecture into the new <asm/barebox.lds.h> header file. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221010061122.2084009-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/barebox.lds.h2
-rw-r--r--arch/mips/lib/barebox.lds.S2
-rw-r--r--arch/mips/lib/pbl.lds.S2
-rw-r--r--arch/mips/pbl/zbarebox.lds.S2
4 files changed, 5 insertions, 3 deletions
diff --git a/arch/mips/include/asm/barebox.lds.h b/arch/mips/include/asm/barebox.lds.h
index 540d740959..124f3d5d66 100644
--- a/arch/mips/include/asm/barebox.lds.h
+++ b/arch/mips/include/asm/barebox.lds.h
@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#define BAREBOX_OUTPUT_ARCH "mips"
+
#include <asm-generic/barebox.lds.h>
diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S
index 87668c7a73..1259a4e94f 100644
--- a/arch/mips/lib/barebox.lds.S
+++ b/arch/mips/lib/barebox.lds.S
@@ -6,7 +6,7 @@
#include <asm/barebox.lds.h>
-OUTPUT_ARCH(mips)
+OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH)
ENTRY(_start)
SECTIONS
{
diff --git a/arch/mips/lib/pbl.lds.S b/arch/mips/lib/pbl.lds.S
index 521333df0b..4cf0398f33 100644
--- a/arch/mips/lib/pbl.lds.S
+++ b/arch/mips/lib/pbl.lds.S
@@ -10,7 +10,7 @@
#define BASE (TEXT_BASE - SZ_2M)
-OUTPUT_ARCH("mips")
+OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH)
SECTIONS
{
. = BASE;
diff --git a/arch/mips/pbl/zbarebox.lds.S b/arch/mips/pbl/zbarebox.lds.S
index 2d82065bce..e3114dfe22 100644
--- a/arch/mips/pbl/zbarebox.lds.S
+++ b/arch/mips/pbl/zbarebox.lds.S
@@ -6,7 +6,7 @@
#include <asm/barebox.lds.h>
#include <asm-generic/memory_layout.h>
-OUTPUT_ARCH("mips")
+OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH)
ENTRY(pbl_start)
SECTIONS
{