diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-04-04 19:13:30 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-04-04 19:13:30 +0000 |
commit | b8b5d03f03ab607eb3d9b99c2156ac64f71a48ab (patch) | |
tree | 9d9f0484436db3eac0195f5476474530c86de033 /lld/ELF/InputSection.cpp | |
parent | 0eec7d00cfa7fbe416c42c7bca1675270da89bad (diff) |
Don't ignore addend in getOffset.
We were ignoring the addend if the piece was dead. I don't expect this
to make a difference in any real world situations, but it is simpler
anyway.
Diffstat (limited to 'lld/ELF/InputSection.cpp')
-rw-r--r-- | lld/ELF/InputSection.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 73f5d66e6b2..7d0117cd618 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -978,9 +978,6 @@ uint64_t MergeInputSection::getOffset(uint64_t Offset) const { // In that case we need to search from the original section piece vector. const SectionPiece &Piece = *findSectionPiece(const_cast<MergeInputSection *>(this), Offset); - if (!Piece.Live) - return 0; - uint64_t Addend = Offset - Piece.InputOff; return Piece.OutputOff + Addend; } |