This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Added partial support for --emit-relocs (no --gc-section case) #2
AbandonedPublic

Authored by grimar on Feb 7 2017, 5:51 AM.

Details

Reviewers
ruiu
rafael
Summary

It is close to D29273, but has different implementation of filtering out
.rel[a] sections if target section was discarded.

Also testcase was simplified.

Diff Detail

Event Timeline

grimar updated this revision to Diff 87414.Feb 7 2017, 6:12 AM
  • Removed useless limitation.
grimar added a comment.Feb 7 2017, 6:27 AM

So difference with D29273 is scanRelocationSections() method which scans over REL[A} sections after
proccessing the commands and marks all relocation sections that refer to dead target also as dead.
That way we do not emit them to the output, do not crash, what is expected and does not use DependentSection member also.
What keeps it be used for GC cases only.

tpimh added a subscriber: tpimh.Feb 7 2017, 12:33 PM
grimar abandoned this revision.Feb 14 2017, 12:34 AM

I think D29273 was better because allows to implement gc case easily as shown in D28612.