[all-commits] [llvm/llvm-project] 0139c8: [CFGuard] Add address-taken IAT tables and delay-l...

Andrew Paverd via All-commits all-commits at lists.llvm.org
Tue Nov 17 18:32:37 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0139c8af8da7a89c02ed802df46492f5caddb41b
      https://github.com/llvm/llvm-project/commit/0139c8af8da7a89c02ed802df46492f5caddb41b
  Author: Andrew Paverd <andrew.paverd at microsoft.com>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

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

  Log Message:
  -----------
  [CFGuard] Add address-taken IAT tables and delay-load support

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.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D87544




More information about the All-commits mailing list