This is an archive of the discontinued LLVM Phabricator instance.

[coff] correctly emit safeseh entries for handlers defined in dlls
ClosedPublic

Authored by inglorion on Nov 15 2017, 2:34 PM.

Details

Summary

We previously assumed that all SafeSEH handlers are
DefinedRegular symbols. This is not the case for handlers defined in
DLLs. As a result, we were failing to emit entries in the SafeSEH
table for those handlers. This change fixes that.

Fixes PR35324.

Diff Detail

Repository
rL LLVM

Event Timeline

inglorion created this revision.Nov 15 2017, 2:34 PM
inglorion updated this revision to Diff 123087.Nov 15 2017, 2:56 PM

updated test to check for exactly one entry instead of at least one

inglorion updated this revision to Diff 123094.Nov 15 2017, 3:19 PM
inglorion edited the summary of this revision. (Show Details)
inglorion removed a subscriber: smeenai.

updated description to point to bug report

rnk accepted this revision.Nov 15 2017, 4:39 PM

lgtm

No yaml support for import libraries, I take it?

This revision is now accepted and ready to land.Nov 15 2017, 4:39 PM

No yaml support for import libraries, I take it?

Looks that way. There are also a couple of other .libs in the Inputs directory, so I just did the same thing.

This revision was automatically updated to reflect the committed changes.
pcc added a subscriber: pcc.Nov 15 2017, 5:28 PM

No yaml support for import libraries, I take it?

Looks that way. There are also a couple of other .libs in the Inputs directory, so I just did the same thing.

Couldn't you use lld to create an import library?
http://llvm-cs.pcc.me.uk/tools/lld/COFF/Driver.cpp#1115