This is an archive of the discontinued LLVM Phabricator instance.

[coff] use relative instead of absolute __safe_se_handler_base when present
ClosedPublic

Authored by inglorion on Nov 7 2017, 3:11 PM.

Details

Summary

__safe_se_handler_base should be either absolute 0 (when no SafeSEH
table is present), or relative to the image base (when the table is
present). An earlier change inadvertedly made the symbol absolute in
both cases, leading to the SafeSEH table not being locatble at run
time. This change fixes that and updates the safeseh test to check for
the presence of the relocation.

Diff Detail

Repository
rL LLVM

Event Timeline

inglorion created this revision.Nov 7 2017, 3:11 PM
ruiu accepted this revision.Nov 7 2017, 3:15 PM

LGTM

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

The code change mostly just moves code around, but this helps because we previously fixed the symbol type too late, so that it was still output as an absolute symbol. After moving the code around, we now output __safe_se_handler_base with the correct symbol type.

This revision was automatically updated to reflect the committed changes.