[llvm] [Hexagon] Support .reloc asm directive (PR #183849)
Alexey Karyakin via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 08:58:15 PST 2026
================
@@ -81,6 +82,20 @@ class HexagonAsmBackend : public MCAsmBackend {
return Result;
}
+ std::optional<MCFixupKind> getFixupKind(StringRef Name) const override {
+ unsigned Type = llvm::StringSwitch<unsigned>(Name)
+#define ELF_RELOC(X, Y) .Case(#X, Y)
+#include "llvm/BinaryFormat/ELFRelocs/Hexagon.def"
+#undef ELF_RELOC
+ .Case("BFD_RELOC_NONE", ELF::R_HEX_NONE)
+ .Case("BFD_RELOC_16", ELF::R_HEX_16)
----------------
quic-akaryaki wrote:
Good question, but I have added it too as it's documented in the ABI.
https://github.com/llvm/llvm-project/pull/183849
More information about the llvm-commits
mailing list