This is an archive of the discontinued LLVM Phabricator instance.

[COFF] Emit @feat.00 on 64-bit and set the CFG bit when emitting guardcf tables
ClosedPublic

Authored by hans on Sep 18 2018, 7:33 AM.

Details

Summary

The 0x800 bit in @feat.00 needs to be set in order to make LLD pick up the .gfid$y table. I believe this is fine to set even if we don't emit the instrumentation.

We haven't emitted @feat.00 on 64-bit before. I see that MSVC does emit it, but I'm not entirely sure what the default value should be. I went with zero since that seems as safe as not emitting the symbol in the first place.

Please take a look.

Diff Detail

Event Timeline

hans created this revision.Sep 18 2018, 7:33 AM
rnk accepted this revision.Sep 18 2018, 9:25 AM

lgtm, thanks!

This revision is now accepted and ready to land.Sep 18 2018, 9:25 AM
This revision was automatically updated to reflect the committed changes.