diff mbox series

[v1,1/2] arm64: Remove duplicated symbols

Message ID 20230504075459.59855-2-leo.yan@linaro.org
State Accepted
Commit 4787c764f98ac9d4670ff45e11676c28fb61b882
Headers show
Series arm64: Fix building failure for Xen target | expand

Commit Message

Leo Yan May 4, 2023, 7:54 a.m. UTC
When build U-boot with clang with using commands:

  $ make HOSTCC=clang xenguest_arm64_defconfig
  $ make HOSTCC=clang CROSS_COMPILE=aarch64-linux-gnu- \
		CC="clang -target aarch64-linux-gnueabi" -j8

The compiler reports error:

  /tmp/start-acdf31.s:330:1: error: symbol '_start' is already defined
  _start:
  ^

Because the symbol '_start' has been defined twice, one is defined in
arch/arm/cpu/armv8/start.S, another is defined in the header
boot0-linux-kernel-header.h.

To fix building failure, this patch removes the symbol '_start' from
boot0-linux-kernel-header.h.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
 arch/arm/include/asm/boot0-linux-kernel-header.h | 2 --
 1 file changed, 2 deletions(-)

Comments

Tom Rini June 1, 2023, 7:48 p.m. UTC | #1
On Thu, May 04, 2023 at 03:54:58PM +0800, Leo Yan wrote:

> When build U-boot with clang with using commands:
> 
>   $ make HOSTCC=clang xenguest_arm64_defconfig
>   $ make HOSTCC=clang CROSS_COMPILE=aarch64-linux-gnu- \
> 		CC="clang -target aarch64-linux-gnueabi" -j8
> 
> The compiler reports error:
> 
>   /tmp/start-acdf31.s:330:1: error: symbol '_start' is already defined
>   _start:
>   ^
> 
> Because the symbol '_start' has been defined twice, one is defined in
> arch/arm/cpu/armv8/start.S, another is defined in the header
> boot0-linux-kernel-header.h.
> 
> To fix building failure, this patch removes the symbol '_start' from
> boot0-linux-kernel-header.h.
> 
> Signed-off-by: Leo Yan <leo.yan@linaro.org>

Applied to u-boot/next, thanks!
diff mbox series

Patch

diff --git a/arch/arm/include/asm/boot0-linux-kernel-header.h b/arch/arm/include/asm/boot0-linux-kernel-header.h
index c6cd76f32a..c930fea5fd 100644
--- a/arch/arm/include/asm/boot0-linux-kernel-header.h
+++ b/arch/arm/include/asm/boot0-linux-kernel-header.h
@@ -31,8 +31,6 @@ 
 	.long	\sym\()_hi32
 	.endm
 
-.globl _start
-_start:
 	/*
 	 * DO NOT MODIFY. Image header expected by Linux boot-loaders.
 	 */