fmayer added inline comments.
================ Comment at: llvm/lib/MC/ELFObjectWriter.cpp:622 + assert(MemtagRelocs != nullptr && + "Tagged globals are only supported on AArch64"); + Asm.registerSection(*MemtagRelocs); ---------------- Is the story here that on non-AArch64, this function gets run, but there will be no SymE.isMemtag()? ================ Comment at: llvm/lib/MC/ELFObjectWriter.cpp:1334-1341 + // For memory-tagged symbols, ensure that the relocation uses the symbol. For + // tagged symbols, we emit an empty relocation (R_AARCH64_NONE) in a special + // section (SHT_AARCH64_MEMTAG_GLOBALS_STATIC) to indicate to the linker that + // this global needs to be tagged. In addition, the linker needs to know + // whether to emit a special addend when relocating `end` symbols, and this + // can only be determined by the attributes of the symbol itself. + if (Sym->isMemtag()) ---------------- move this after the assert for `Sym` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128958/new/ https://reviews.llvm.org/D128958 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits