[PATCH] D87544: [CFGuard] Add address-taken IAT tables and delay-load support

Andrew Paverd via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 12:41:55 PDT 2020


ajpaverd created this revision.
ajpaverd added reviewers: rnk, ruiu, amccarth, theraven.
Herald added subscribers: llvm-commits, rupprecht, hiraditya.
Herald added a reviewer: jhenderson.
Herald added a project: LLVM.
ajpaverd requested review of this revision.
Herald added a subscriber: MaskRay.

This patch adds support for creating Guard Address-Taken IAT Entry Tables (.giats$y sections) in object files, matching the behavior of MSVC. These contain lists of address-taken imported functions, which are used by the linker to create the final GIATS table.
Additionally, if any DLLs are delay-loaded, the linker must look through the .giats tables and add the respective load thunks of address-taken imports to the GFIDS table, as these are also valid call targets.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87544

Files:
  lld/COFF/DLL.cpp
  lld/COFF/ICF.cpp
  lld/COFF/InputFiles.cpp
  lld/COFF/InputFiles.h
  lld/COFF/Symbols.h
  lld/COFF/Writer.cpp
  lld/test/COFF/giats.s
  llvm/include/llvm/MC/MCObjectFileInfo.h
  llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
  llvm/lib/MC/MCObjectFileInfo.cpp
  llvm/test/CodeGen/WinCFGuard/cfguard-giats.ll
  llvm/tools/llvm-readobj/COFFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87544.291316.patch
Type: text/x-patch
Size: 19675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/d88d50cd/attachment.bin>


More information about the llvm-commits mailing list