pyelftools
pyelftools copied to clipboard
Incorrect offset in CU iter_DIE_children
When iterating DIEs children in a compile unit the offset is calculated based on:
elif "DW_AT_sibling" in child.attributes:
sibling = child.attributes["DW_AT_sibling"]
cur_offset = sibling.value + self.cu_offset
If sibling.form is of type DW_FORM_ref_addr the cur_offset will be incorrect. The elf I am using has both DW_FORM_ref_addr and DW_FORM_ref4
Can you provide either instructions how to generate or a small elf to demonstrate this?