Page MenuHomePhabricator

Remove no-op code.
Needs ReviewPublic

Authored by ruiu on Feb 14 2019, 11:23 AM.

Details

Reviewers
PkmX
espindola
Summary

I believe relocations are sorted by offset, so this code is redundant.
We have the same assumption for other targets.

Event Timeline

ruiu created this revision.Feb 14 2019, 11:23 AM
Herald added a project: Restricted Project. · View Herald Transcript
PkmX added a comment.Apr 8 2019, 10:48 AM

GNU as for RISC-V does actually produce out-of-order relocations so lld cannot assume they are always sorted by offset. This was previously discussed at:

https://github.com/riscv/riscv-binutils-gdb/issues/107

Some parts of the code in lld like OffsetGetter::get() for merging .eh_frame also depends on the relocations being sorted by offset, so sorting here isn't simply a performance optimization to do binary search.

lenary added a subscriber: lenary.Aug 1 2019, 5:01 AM

Given this code is not redundant, please can you mark this patch as abandoned?