This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Check that we do not mix regular and synthetic sections.
AbandonedPublic

Authored by grimar on Feb 28 2017, 8:02 AM.

Details

Reviewers
ruiu
rafael
Summary

Our current logic assumes we place synthetic sections
after all regular ones. I lost some time during writing another patch
because placed some code that added sections before code
that adds common section. That broke logic of removeUnusedSyntheticSections
for me.

There are few possible ways to avoid that.
One of them would be to remove dependency on such logic from
removeUnusedSyntheticSections().

The second is this patch, which introduces an assert check to ensure
that does not happen.

Diff Detail

Event Timeline

grimar created this revision.Feb 28 2017, 8:02 AM
ruiu edited edge metadata.Feb 28 2017, 9:24 AM

This is probably doing too much to enforce an obscure invariance. Instead, can you remove the assumption that all synthetic sections must be end of the input sections list?

grimar abandoned this revision.Mar 30 2017, 1:30 AM