This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Change order of new sections
ClosedPublic

Authored by maksfb on Oct 4 2022, 7:29 PM.

Details

Summary

While the order of new sections in the output binary was deterministic
in the past (i.e. there was no run-to-run variation), it wasn't always
rational as we used size to define the precedence of allocatable
sections within "code" or "data" groups (probably unintentionally).
Fix that by defining stricter section-ordering rules.

Other than the order of sections, this should be NFC.

Diff Detail

Event Timeline

maksfb created this revision.Oct 4 2022, 7:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 7:29 PM
Herald added a subscriber: treapster. · View Herald Transcript
maksfb requested review of this revision.Oct 4 2022, 7:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 7:29 PM
maksfb updated this revision to Diff 465560.Oct 5 2022, 2:42 PM

Fix MachO. Add a test case.

rafauler accepted this revision.Oct 6 2022, 5:35 PM

LGTM

This revision is now accepted and ready to land.Oct 6 2022, 5:35 PM
This revision was automatically updated to reflect the committed changes.