[PATCH] D43288: [AArch64] Add support for secrel add/load/store relocations for COFF
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 1 11:05:01 PST 2018
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
Looks good to me, but I don't know much about AArch64 or its COFF relocations.
================
Comment at: lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h:38-39
VK_TLSDESC = 0x007,
- VK_SymLocBits = 0x00f,
+ VK_SECREL = 0x200,
+ VK_SymLocBits = 0x20f,
----------------
VariantKind has 32 bits. It's probably cleaner to move the VK_AddressFragBits over to 0xf00 and VK_NC to 0x1000 and give ourselves 8 bits for symbol locations.
================
Comment at: lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp:71-72
case FK_SecRel_2:
return COFF::IMAGE_REL_ARM64_SECTION;
----------------
This is outside the scope of the change, but we really should invent a separate 16 bit section index fixup for COFF instead of overloading this 2 byte secrel fixup for section table indices.
https://reviews.llvm.org/D43288
More information about the llvm-commits
mailing list