This is an archive of the discontinued LLVM Phabricator instance.

Do not assume .idata is zero-initialized.
ClosedPublic

Authored by ruiu on Nov 29 2018, 5:30 PM.

Details

Summary

We initialize .text section with 0xcc (INT3 instruction), so we need to
explicitly write data even if it is zero if it can be in a .text section.
If you specify /merge:.rdata=.text, .rdata (which contains .idata) is put
to .text, so we need to do this.

Fixes https://bugs.llvm.org/show_bug.cgi?id=39826

Event Timeline

ruiu created this revision.Nov 29 2018, 5:30 PM
rnk accepted this revision.Nov 29 2018, 5:43 PM

lgtm

This revision is now accepted and ready to land.Nov 29 2018, 5:43 PM
This revision was automatically updated to reflect the committed changes.