diff options
| author | Mark Stapp <mjs@voltanet.io> | 2021-04-12 08:07:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-12 08:07:05 -0400 |
| commit | 53c42c82deb8e5ee882726c97e62b21e25b03b15 (patch) | |
| tree | d9ca67ff20aa455d8680eee18726f100ce18a631 /python/clippy/elf.py | |
| parent | 8435eae7bb059df82a886ef03a30c5dd620a21df (diff) | |
| parent | 0490ce41c133f9a801f36668dd58b326ec72a7aa (diff) | |
Merge pull request #8421 from opensourcerouting/xrelfo-arm
fix xrelfo on ARM(32) & cross-compile
Diffstat (limited to 'python/clippy/elf.py')
| -rw-r--r-- | python/clippy/elf.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/clippy/elf.py b/python/clippy/elf.py index 4ed334f0c4..02cb2e38b3 100644 --- a/python/clippy/elf.py +++ b/python/clippy/elf.py @@ -162,7 +162,10 @@ class ELFDissectData(object): for field in parent._efields[self.elfclass]: if field[0] == fieldname: break - offset += struct.calcsize(field[1]) + spec = field[1] + if spec == 'P': + spec = 'I' if self.elfclass == 32 else 'Q' + offset += struct.calcsize(spec) else: raise AttributeError('%r not found in %r.fields' % (fieldname, parent)) |
