Simplify. NFC.

Using getOffset is here was a bit of an overkill. This is being
written and has relocations. This implies it is a .eh_frame or regular
section.

llvm-svn: 330307
This commit is contained in:
Rafael Espindola 2018-04-19 03:51:26 +00:00
parent 719fcd08c6
commit 9c680301b0

View File

@ -710,7 +710,9 @@ void InputSectionBase::relocateAlloc(uint8_t *Buf, uint8_t *BufEnd) {
const unsigned Bits = Config->Wordsize * 8;
for (const Relocation &Rel : Relocations) {
uint64_t Offset = getOffset(Rel.Offset);
uint64_t Offset = Rel.Offset;
if (auto *Sec = dyn_cast<InputSection>(this))
Offset += Sec->OutSecOff;
uint8_t *BufLoc = Buf + Offset;
RelType Type = Rel.Type;