public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Fangrui Song <maskray@google•com>
To: linuxppc-dev@lists•ozlabs.org
Cc: Fangrui Song <maskray@google•com>, Alan Modra <amodra@gmail•com>,
	Nick Desaulniers <ndesaulniers@google•com>,
	clang-built-linux@googlegroups•com, Joel Stanley <joel@jms•id.au>
Subject: [PATCH v2] powerpc/boot: Delete unneeded .globl _zimage_start
Date: Wed, 25 Mar 2020 09:42:57 -0700	[thread overview]
Message-ID: <20200325164257.170229-1-maskray@google.com> (raw)

.globl sets the symbol binding to STB_GLOBAL while .weak sets the
binding to STB_WEAK. GNU as let .weak override .globl since binutils-gdb
5ca547dc2399a0a5d9f20626d4bf5547c3ccfddd (1996). Clang integrated
assembler let the last win but it may error in the future.

Since it is a convention that only one binding directive is used, just
delete .globl.

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>
Cc: Alan Modra <amodra@gmail•com>
Cc: Joel Stanley <joel@jms•id.au>
Cc: Michael Ellerman <mpe@ellerman•id.au>
Cc: Nick Desaulniers <ndesaulniers@google•com>
Cc: Segher Boessenkool <segher@kernel•crashing.org>
Cc: clang-built-linux@googlegroups•com
---
 arch/powerpc/boot/crt0.S | 3 ---
 1 file changed, 3 deletions(-)

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


             reply	other threads:[~2020-03-25 16:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 16:42 Fangrui Song [this message]
2020-03-26 22:16 ` [PATCH v2] powerpc/boot: Delete unneeded .globl _zimage_start Segher Boessenkool
2020-03-26 22:26   ` Fangrui Song
2020-03-27 15:24     ` Segher Boessenkool
2020-03-27 16:50       ` Fangrui Song
2020-03-27 18:27         ` Segher Boessenkool
2020-04-01 12:53 ` Michael Ellerman

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=20200325164257.170229-1-maskray@google.com \
    --to=maskray@google$(echo .)com \
    --cc=amodra@gmail$(echo .)com \
    --cc=clang-built-linux@googlegroups$(echo .)com \
    --cc=joel@jms$(echo .)id.au \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=ndesaulniers@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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