This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Name MergeSyntheticSection using an input section instead of the output section
ClosedPublic

Authored by MaskRay on Apr 28 2023, 10:28 AM.

Details

Summary

In a link map, the input section name gives more information. See the updated
merge-entsize.s for an example. The output file is unchanged.

Compiler generated input sections with the SHF_MERGE flag have names such as
.rodata.str1.1 and .rodata.cstN, and are not affected by -fdata-sections.

Diff Detail

Event Timeline

MaskRay created this revision.Apr 28 2023, 10:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2023, 10:28 AM
MaskRay requested review of this revision.Apr 28 2023, 10:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2023, 10:28 AM
peter.smith accepted this revision.May 2 2023, 12:42 AM

I agree with the change. This should help distinguish the cases where there are more than one MergeSection within the same OutputSection.

This revision is now accepted and ready to land.May 2 2023, 12:42 AM
This revision was landed with ongoing or failed builds.May 2 2023, 9:35 AM
This revision was automatically updated to reflect the committed changes.