[lld] [LLD][COFF] Add support for ARM64EC auxiliary IAT (PR #108304)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 04:15:13 PDT 2024


================
@@ -142,6 +142,30 @@ class NullChunk : public NonSectionChunk {
   size_t size;
 };
 
+// A chunk for ARM64EC auxiliary IAT.
+class AuxImportChunk : public NonSectionChunk {
+public:
+  explicit AuxImportChunk(ImportFile *file) : file(file) {
+    setAlignment(sizeof(uint64_t));
+  }
+  size_t getSize() const override { return sizeof(uint64_t); }
+
+  void writeTo(uint8_t *buf) const override {
+    uint64_t impchkVA = 0;
+    if (file->impchkThunk)
+      impchkVA = file->impchkThunk->getRVA() + file->ctx.config.imageBase;
----------------
mstorsjo wrote:

Hmm, so these aux IAT entries contain a full absolute address when on disk? That's unusual, but I guess it doesn't matter (wrt requiring runtime base relocations or not) as the loader needs to fill them in, in any case.

https://github.com/llvm/llvm-project/pull/108304


More information about the llvm-commits mailing list