[llvm] [AArch64, ELF] Allow implicit $d/$x at section beginning (PR #99718)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 12:18:06 PDT 2024


================
@@ -269,15 +281,15 @@ class AArch64ELFStreamer : public MCELFStreamer {
     LastEMS = EMS_A64;
   }
 
-  void emitMappingSymbol(StringRef Name) {
+  MCSymbol *emitMappingSymbol(StringRef Name) {
     auto *Symbol = cast<MCSymbolELF>(getContext().createLocalSymbol(Name));
     emitLabel(Symbol);
-    Symbol->setType(ELF::STT_NOTYPE);
-    Symbol->setBinding(ELF::STB_LOCAL);
+    return Symbol;
----------------
smithp35 wrote:

Are these not required because they are the defaults?

If they are the default it may be worth a follow up NFC refactor to the other backend emitMappingSymbol 

I can't see any test that checks that mapping symbols are local and STT_NOTYPE. If we're relying on defaults then we ought to add one to make sure.

https://github.com/llvm/llvm-project/pull/99718


More information about the llvm-commits mailing list