summaryrefslogtreecommitdiff
path: root/arch/powerpc
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/powerpc
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/powerpc')
-rw-r--r--arch/powerpc/boards/pcm030/barebox.lds.S2
-rw-r--r--arch/powerpc/include/asm/barebox.lds.h2
-rw-r--r--arch/powerpc/mach-mpc85xx/barebox.lds.S2
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/powerpc/boards/pcm030/barebox.lds.S b/arch/powerpc/boards/pcm030/barebox.lds.S
index b90e880581..146b63fe88 100644
--- a/arch/powerpc/boards/pcm030/barebox.lds.S
+++ b/arch/powerpc/boards/pcm030/barebox.lds.S
@@ -16,7 +16,7 @@
#include <asm/barebox.lds.h>
-OUTPUT_ARCH("powerpc")
+OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH)
ENTRY(_start)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
diff --git a/arch/powerpc/include/asm/barebox.lds.h b/arch/powerpc/include/asm/barebox.lds.h
index 540d740959..14477bd44a 100644
--- a/arch/powerpc/include/asm/barebox.lds.h
+++ b/arch/powerpc/include/asm/barebox.lds.h
@@ -1,3 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#define BAREBOX_OUTPUT_ARCH "powerpc"
+
#include <asm-generic/barebox.lds.h>
diff --git a/arch/powerpc/mach-mpc85xx/barebox.lds.S b/arch/powerpc/mach-mpc85xx/barebox.lds.S
index 253fd3735e..764854a860 100644
--- a/arch/powerpc/mach-mpc85xx/barebox.lds.S
+++ b/arch/powerpc/mach-mpc85xx/barebox.lds.S
@@ -21,7 +21,7 @@
#define RESET_VECTOR_ADDRESS 0xfffffffc
#endif
-OUTPUT_ARCH("powerpc")
+OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH)
ENTRY(_start_e500)
PHDRS