Thread (7 messages) flat view 7 messages, 3 authors, 2020-04-01

Re: [PATCH v2] powerpc/boot: Delete unneeded .globl _zimage_start

From: Segher Boessenkool <hidden>
Date: 2020-03-26 22:18:06

On Wed, Mar 25, 2020 at 09:42:57AM -0700, Fangrui Song wrote:
.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.
GNU AS works for more than just ELF.  The way the assembler language
is defined, it is not .weak overriding .globl -- instead, .weak sets a
symbol attribute.  On an existing symbol (but it creates on if there is
none yet).

Clang is buggy if it does not allow valid (and perfectly normal)
assembler code like this.


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help