Reputation: 253
For example, I've seen _start
as .global _start
and .globl _start
. It seems like I can just use them interchangeably. Is there any difference between the two?
Upvotes: 17
Views: 5183
Reputation: 2403
They are the same. In fact, the LLVM assembler in MCParser/AsmParser.cpp lexes them as DK_GLOBL and DK_GLOBAL
DirectiveKindMap[".globl"] = DK_GLOBL;
DirectiveKindMap[".global"] = DK_GLOBAL;
but then parses them as the same attribute.
case DK_GLOBL:
case DK_GLOBAL:
return parseDirectiveSymbolAttribute(MCSA_Global);
Upvotes: 7