Skip to content

Commit

Permalink
[ELF] RelocationScanner::scanOne: replace rel.r_offset with offset. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Jan 17, 2022
1 parent 966f24e commit 54fe70b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lld/ELF/Relocations.cpp
Expand Up @@ -1310,10 +1310,10 @@ template <class ELFT, class RelTy> void RelocationScanner::scanOne(RelTy *&i) {
// Error if the target symbol is undefined. Symbol index 0 may be used by
// marker relocations, e.g. R_*_NONE and R_ARM_V4BX. Don't error on them.
if (sym.isUndefined() && symIndex != 0 &&
maybeReportUndefined(cast<Undefined>(sym), sec, rel.r_offset))
maybeReportUndefined(cast<Undefined>(sym), sec, offset))
return;

const uint8_t *relocatedAddr = sec.data().begin() + rel.r_offset;
const uint8_t *relocatedAddr = sec.data().begin() + offset;
RelExpr expr = target.getRelExpr(type, sym, relocatedAddr);

// Ignore R_*_NONE and other marker relocations.
Expand Down

0 comments on commit 54fe70b

Please sign in to comment.