mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
python: fix 32-bit pointers in xrelfo container_of
This was mistakenly using the host platform's pointer size rather than the ELF file's. Only noticeable when cross compiling... Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
81693617a2
commit
b17f302b20
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue