[PATCH] D85242: [AArch64] [Windows] Error out on some ELF style GOT relative relocations

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 13:51:24 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp:96
         return COFF::IMAGE_REL_ARM64_SECREL_LOW12L;
+      if (RefKind & AArch64MCExpr::VK_GOT)
+        Ctx.reportError(Fixup.getLoc(), "unknown AArch64 symbol kind!");
----------------
VK_GOT isn't a bitmask.

If you need to mask, use the helpers AArch64MCExpr::getSymbolLoc() etc.

We probably also want to exclude other variants that don't make sense, like VK_GOTTPREL?

"unknown AArch64 symbol kind" isn't a great error message; can we explicitly say that we don't expect this kind of symbol on COFF targets?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85242/new/

https://reviews.llvm.org/D85242



More information about the llvm-commits mailing list