[PATCH] D33183: [ELF] - Simplify readAddressArea() implementation.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 03:48:00 PDT 2017


grimar added a comment.

Rafael, Rui, thanks for review.

During rebasing it I faced with 2 more issues I did not expect to see (otherwise I would rebase it earlier before asking for final reviews).
Fortunately they seems to be minor so I am going to commit this with fixes for them.

1. I had to add S->Live check. That is fine because was done by https://reviews.llvm.org/D33175 already, so I just added this check to support already existent case we support.
2. I had to skip ranges which has R.LowPC == R.HighPC before adding them to index. That allows to pass testcase introduced by https://reviews.llvm.org/D33176. That change is consistent with gold

behavior and correct because DWARF manual says that: "A range list entry (but not a base address selection or end of list entry) whose beginning and
ending addresses are equal has no effect because the size of the range covered by such an entry is zero.". So there is no much sence to add
empty ranges to index and our previous logic already did not do that implicitly.

These two changes are consistent with current LLD behavior already and I hope fine.


https://reviews.llvm.org/D33183





More information about the llvm-commits mailing list