This is an archive of the discontinued LLVM Phabricator instance.

Merge .xdata into .rdata by default
ClosedPublic

Authored by rnk on Nov 17 2017, 2:25 PM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

rnk created this revision.Nov 17 2017, 2:25 PM
rnk added a comment.Nov 17 2017, 3:17 PM

Do you think we should merge .idata, .edata, and .didata into .rdata as well? That will be more involved than this.

What are the advantages to the section merging, apart from matching link's ouput? I personally prefer LLD keeping the separate sections, since it's easier to examine them that way.

rnk added a comment.Nov 17 2017, 3:55 PM

What are the advantages to the section merging, apart from matching link's ouput? I personally prefer LLD keeping the separate sections, since it's easier to examine them that way.

Saves alignment padding, mostly. All of .xdata, .edata, .idata, and .didata can be dumped by llvm-readobj by starting from the PE headers, so they aren't that hard to read without section headers. The alignment padding is particularly bad when sections have different protections so we have to pad out to 4096 to get to a page boundary, as in .data vs. .didata, which are typically near each other because we sort output sections alphabetically.

Ah all right, that makes sense then.

ruiu accepted this revision.Nov 19 2017, 10:14 PM

LGTM

This revision is now accepted and ready to land.Nov 19 2017, 10:14 PM
This revision was automatically updated to reflect the committed changes.
rnk added a comment.Nov 30 2017, 5:05 PM

This caused EH-related test failures on 32-bit LLD bots: https://ci.chromium.org/buildbot/chromium.clang/CrWinClangLLD/166

64-bit code was fine. I'm reverting and will investigate later.