diff mbox series

[v5,1/6] fw_base: Don't mark fw_platform_init as both global and weak

Message ID 20210711022824.29915-2-jrtc27@jrtc27.com
State Accepted
Headers show
Series Fully support standalone Clang/LLVM toolchains | expand

Commit Message

Jessica Clarke July 11, 2021, 2:28 a.m. UTC
These are mutually exclusive. GNU as and LLVM both let later binding
directives override earlier ones so this works as intended, but LLVM 12
turned this into a warning as there's no good reason to do such a thing
and could be a potential bug. Thus, remove the redundant and incorrect
.globl directive for fw_platform_init.

Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
---
 firmware/fw_base.S | 1 -
 1 file changed, 1 deletion(-)

Comments

Anup Patel July 11, 2021, 2:35 p.m. UTC | #1
On Sun, Jul 11, 2021 at 7:58 AM Jessica Clarke <jrtc27@jrtc27.com> wrote:
>
> These are mutually exclusive. GNU as and LLVM both let later binding
> directives override earlier ones so this works as intended, but LLVM 12
> turned this into a warning as there's no good reason to do such a thing
> and could be a potential bug. Thus, remove the redundant and incorrect
> .globl directive for fw_platform_init.
>
> Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> Tested-by: Bin Meng <bmeng.cn@gmail.com>

Reviewed-by: Anup Patel <anup.patel@wdc.com>

Applied this patch to the riscv/opensbi repo.

Thanks,
Anup

> ---
>  firmware/fw_base.S | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/firmware/fw_base.S b/firmware/fw_base.S
> index a5ce946..ee2a51b 100644
> --- a/firmware/fw_base.S
> +++ b/firmware/fw_base.S
> @@ -553,7 +553,6 @@ _start_hang:
>
>         .section .entry, "ax", %progbits
>         .align 3
> -       .globl fw_platform_init
>         .weak fw_platform_init
>  fw_platform_init:
>         add     a0, a1, zero
> --
> 2.31.0
>
>
> --
> opensbi mailing list
> opensbi@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi
diff mbox series

Patch

diff --git a/firmware/fw_base.S b/firmware/fw_base.S
index a5ce946..ee2a51b 100644
--- a/firmware/fw_base.S
+++ b/firmware/fw_base.S
@@ -553,7 +553,6 @@  _start_hang:
 
 	.section .entry, "ax", %progbits
 	.align 3
-	.globl fw_platform_init
 	.weak fw_platform_init
 fw_platform_init:
 	add	a0, a1, zero