Replies: 1 comment 3 replies
-
I guess I don't fully understand the question. What does nontrivial mean, can you use an example to clarify? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The method
get_dwarf_info
has an optional parameterrelocate_dwarf_sections
, defaulting toTrue
.From what I understand, the purpose of relocating an executable/shared object binary during loading by the operating system's ELF loader is adjusting the data in the sections to work when the starting address differs from the address that the binary was linked with. Now, when pyelftools loads a binary, there is no starting address - or rather, the bits, one loaded, should look as if the binary is loaded at its preferred starting address. Is there any scenario in which relocation is nontrivial (e. g. makes changes to the bits), even if the loading address matches the preferred address?
The reason why I'm asking, in #586 I'm exploring the possibility of short circuiting the DWARF section loading/transforming logic by straightforwardly memory mapping the bits of the binary, and parsing DWARF straight from those mapped chunks. Relocation would get in the way - if it's nontrivial. The way relocation is currently implemented, I don't see an easy way to check if it is.
Beta Was this translation helpful? Give feedback.
All reactions