This is an archive of the discontinued LLVM Phabricator instance.

[COFF] Keep using associative comdats for xdata/pdata for MinGW
AbandonedPublic

Authored by mstorsjo on Jul 24 2018, 1:59 PM.

Details

Reviewers
rnk
ruiu
pcc
Summary

Using the symbol name as suffix for the section name is enough to keep things working for ld.bfd, but making them proper associative comdats helps LLD to bring them in when necessary.

Diff Detail

Event Timeline

mstorsjo created this revision.Jul 24 2018, 1:59 PM
pcc added a comment.Jul 24 2018, 3:25 PM

I'd prefer if we did something like this rather than changing the linker. I see gcc's non-conformance with the coff spec as a bug and if there aren't any real users of gcc+lld I'd prefer us not to have workarounds for that case.

mstorsjo abandoned this revision.Jul 31 2018, 3:08 AM

As tested by @rnk in D49700 (in the comment https://reviews.llvm.org/D49700#1177295), this doesn't actually cause these sections to be deduplicated when using ld.bfd, so this doesn't work as intended/hoped.