This is an archive of the discontinued LLVM Phabricator instance.

[LLD] [COFF] Strip section name suffix from mingw comdats
ClosedPublic

Authored by mstorsjo on Jun 14 2019, 11:58 AM.

Details

Summary

This is one part of the fix for PR42217.

Not sure where the best place to put the stripping of the section name suffix. I fear (maybe needlessly?) that it breaks something else if we'd place the logic e.g. somewhere in the Chunk classes.

Diff Detail

Event Timeline

mstorsjo created this revision.Jun 14 2019, 11:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 14 2019, 11:58 AM
mstorsjo retitled this revision from [COFF] Strip section name suffix from mingw comdats to [LLD] [COFF] Strip section name suffix from mingw comdats.Jun 14 2019, 11:59 AM
rnk accepted this revision.Jun 14 2019, 1:26 PM

lgtm

I don't think we can do it earlier, I think this is the right spot to do this. It will cut down on memory usage as well, by the way, since we'll have fewer single Chunk PartialSection objects on mingw.

COFF/Writer.cpp
800

Please add a comment explaining that, on mingw, comdat groups are formed by putting the comdat group name after the $ in the section name. This code ignores the comdat group name for the purpose of section sorting.

This revision is now accepted and ready to land.Jun 14 2019, 1:26 PM
This revision was automatically updated to reflect the committed changes.