This is an archive of the discontinued LLVM Phabricator instance.

[lld][ELF] Mark empty NOLOAD output sections SHT_NOBITS instead of SHT_PROGBITS
ClosedPublic

Authored by schultetwin1 on Mar 28 2020, 1:42 AM.

Details

Summary

This fixes PR# 45336.
Output sections described in a linker script as NOLOAD with no input sections would be marked as SHT_PROGBITS.

Diff Detail

Event Timeline

schultetwin1 created this revision.Mar 28 2020, 1:42 AM
MaskRay updated this revision to Diff 253356.Mar 28 2020, 10:03 AM
MaskRay retitled this revision from [lld] Mark empty NOLOAD output sections SH_NOBITS to [lld][ELF] Mark empty NOLOAD output sections SHT_NOBITS instead of SHT_PROGBITS.
MaskRay edited the summary of this revision. (Show Details)

Fix title. Improve test

Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2020, 10:03 AM
MaskRay accepted this revision.Mar 28 2020, 10:04 AM

Thanks! I've adjusted the test a bit.

This revision is now accepted and ready to land.Mar 28 2020, 10:04 AM
This revision was automatically updated to reflect the committed changes.

Thank you! It looks Harbormaster was unable to apply the patch, but that other "buildables" before this one are failing for the same reason. So I'm going to assume this isn't a problem with this diff.