[PATCH] D54723: [COFF] Add exported functions to gfids table for /guard:cf

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 13:51:23 PST 2018


rnk created this revision.
rnk added reviewers: dmajor, hans, amccarth, alex.

MSVC does this, and we should to.

The .gfids table is a table of RVAs, so it's impossible for a DLL to
indicate that an imported symbol is address taken. Therefore, exports
appear to be listed as address taken by the DLL that exports them.

This fixes an issue that Firefox ran into here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1485016#c12

In Firefox, the export directive came from a .def file, but we need to
do this for any kind of export.


https://reviews.llvm.org/D54723

Files:
  lld/COFF/Writer.cpp
  lld/test/COFF/gfids-export.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54723.174678.patch
Type: text/x-patch
Size: 3860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181119/6f0ab610/attachment.bin>


More information about the llvm-commits mailing list