LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Fangrui Song <maskray@google.com>, linuxppc-dev@lists.ozlabs.org
Cc: clang-built-linux@googlegroups.com,
	Nick Desaulniers <ndesaulniers@google.com>,
	Joel Stanley <joel@jms.id.au>, Fangrui Song <maskray@google.com>
Subject: Re: [PATCH] powerpc/boot: Delete unneeded .globl _zimage_start
Date: Wed, 25 Mar 2020 21:42:46 +1100	[thread overview]
Message-ID: <87sghwww9l.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20200325051820.163253-1-maskray@google.com>

Fangrui Song <maskray@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@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

      parent reply	other threads:[~2020-03-25 11:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  5:18 [PATCH] powerpc/boot: Delete unneeded .globl _zimage_start Fangrui Song
2020-03-25  5:22 ` Joel Stanley
2020-03-25  8:37   ` Alan Modra
2020-03-25 16:34     ` Fangrui Song
2020-03-25  6:23 ` Segher Boessenkool
2020-03-25 10:42 ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sghwww9l.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=clang-built-linux@googlegroups.com \
    --cc=joel@jms.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maskray@google.com \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox