mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-01 12:43:47 +00:00
[ELF] RelocationScanner::scanOne: replace rel.r_offset with offset. NFC
This commit is contained in:
parent
966f24e5a6
commit
54fe70bfba
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user