[PATCH] powerpc/boot: Delete unneeded .globl _zimage_start
Michael Ellerman
mpe at ellerman.id.au
Wed Mar 25 21:42:46 AEDT 2020
Fangrui Song <maskray at google.com> writes:
> .globl sets the symbol binding to STB_GLOBAL while .weak sets the
> binding to STB_WEAK. They should not be used together. It is accidetal
> rather then intentional that GNU as let .weak override .globl while
> clang integrated assembler let the last win.
> Fixes: cd197ffcf10b "[POWERPC] zImage: Cleanup and improve zImage entry point"
> Fixes: ee9d21b3b358 "powerpc/boot: Ensure _zimage_start is a weak symbol"
> Link: https://github.com/ClangBuiltLinux/linux/issues/937
> Signed-off-by: Fangrui Song <maskray at google.com>
So it seems the patch is OK but people don't agree with the explanation
in the changelog.
Please send a v2 that captures the responses from Segher and Alan.
cheers
> diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S
> index 92608f34d312..1d83966f5ef6 100644
> --- a/arch/powerpc/boot/crt0.S
> +++ b/arch/powerpc/boot/crt0.S
> @@ -44,9 +44,6 @@ p_end: .long _end
> p_pstack: .long _platform_stack_top
> #endif
>
> - .globl _zimage_start
> - /* Clang appears to require the .weak directive to be after the symbol
> - * is defined. See https://bugs.llvm.org/show_bug.cgi?id=38921 */
> .weak _zimage_start
> _zimage_start:
> .globl _zimage_start_lib
> --
> 2.25.1.696.g5e7596f4ac-goog
More information about the Linuxppc-dev
mailing list