This is an archive of the discontinued LLVM Phabricator instance.

ELF: Don't crash on output sections with a mix of SHF_LINK_ORDER and non-SHF_LINK_ORDER input sections.
AbandonedPublic

Authored by pcc on Mar 7 2018, 6:27 PM.

Details

Summary

The non-SHF_LINK_ORDER sections are sorted at the end.

Event Timeline

pcc created this revision.Mar 7 2018, 6:27 PM
grimar added a subscriber: grimar.Mar 12 2018, 1:35 AM

Please take a look at rLLD327006. One of the things it addressed is this crash, though
with it, LLD now reports "error: incompatible section flags for .text" for your test case,
because it restricted mixing SHF_LINK_ORDER and non-SHF_LINK_ORDER sections
(assumption behind was that since nobody faced the crash, there is no need to support that case).
So, do you want to allow mixing them or just want to fix the crash?

espindola edited reviewers, added: espindola; removed: rafael.Mar 15 2018, 8:32 AM
espindola requested changes to this revision.Mar 15 2018, 3:24 PM

I agree with George. We currently produce an error and it would be better if we could keep doing that.

This revision now requires changes to proceed.Mar 15 2018, 3:24 PM
pcc abandoned this revision.Mar 15 2018, 3:25 PM

I'd be fine with rejecting.