summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/clippy/elf.py5
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))