This is an archive of the discontinued LLVM Phabricator instance.

Move clearOutputSections before sortSections
ClosedPublic

Authored by rafael on Jun 14 2017, 5:25 PM.

Details

Reviewers
ruiu
Summary

This is probably the main patch left in unifying our intermediary representation.

It moves the creation of default commands before section sorting. This has the nice effect that we now have one location where we decide where an orphan section should be placed.

Before this patch sortSections would decide the relative location of orphan sections to other sections, but it was up to placeOrphanSection to decide on the exact location.

We now only sort sections we created since the linker script is already in the correct order.

Diff Detail

Event Timeline

rafael created this revision.Jun 14 2017, 5:25 PM
ruiu accepted this revision.Jun 14 2017, 5:36 PM

LGTM

ELF/LinkerScript.cpp
771–772

Can this be just ISD->Sections = Sec->Sections?

This revision is now accepted and ready to land.Jun 14 2017, 5:36 PM
espindola closed this revision.Mar 14 2018, 4:01 PM
espindola added a subscriber: espindola.

305512