<div dir="ltr">Hi all,<div><br></div><div>I'm hitting this assertion error in llvm:<br><br></div><div>```<br>clang-11: /usr/local/google/home/leonardchan/llvm-monorepo/llvm-project-2/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp:119: virtual unsigned int (anonymous namespace)::AArch64ELFObjectWriter::getRelocType(llvm::MCContext &, const llvm::MCValue &, const llvm::MCFixup &, bool) const: Assertion `(!Target.getSymA() || Target.getSymA()->getKind() == MCSymbolRefExpr::VK_None) && "Should only be expression-level modifiers here"' failed.<br></div><div>```<br><br>when attempting to compile<br><br>```<br>obj:</div><div>  .word func@PLT - .<br>```</div><div><br></div><div>for aarch64-unknown-linux. This assertion only appears when adding the `@PLT`. Otherwise, it compiles without errors. From what I understand, this syntax should still be valid for AArch64. Is there another reason this assertion is triggered, or perhaps there's something invalid with my example?</div><div><br></div><div>The context is I'm attempting to implement a new AArch64 relocation (see <a href="https://reviews.llvm.org/D81184">https://reviews.llvm.org/D81184</a> for reference) which attempts to take the relative offset to a function. If it's not dso_local, we should instead take the offset to the PLT entry for it. I know how to programatically add it through `<a class="gmail-MainCss-annotationInternalLink" href="https://cs.corp.google.com/piper///depot/google3/third_party/llvm/llvm-project/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h?l=36&gs=kythe%253A%252F%252Fgoogle3%253Flang%253Dc%25252B%25252B%253Fpath%253Dthird_party%252Fllvm%252Fllvm-project%252Fllvm%252Finclude%252Fllvm%252FCodeGen%252FTargetLoweringObjectFileImpl.h%2523An-UbhAAWTwX3e3EcidlHLg-1PQfGVpIcOAJZBma4ZQ&gsn=PLTRelativeVariantKind&ct=xref_usages" style="font-size:medium;text-decoration-line:none;color:rgb(85,26,139);font-family:monospace;white-space:pre">PLTRelativeVariantKind</a>` used by `lowerRelativeReference()`, but setting this to anything other than `VK_None` for AArch64 results in this assertion error.</div><div><br></div><div>Thanks,</div><div>Leonard<br><br>CCing Tim Northover who authored the assertion.</div></div>