-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support parsing of dynamic ELFs w/out section headers #3
Comments
Raw patch from the pull request is here: https://dl.dropboxusercontent.com/u/15602400/pyelftools-issue3-patch.patch |
Additional information from OP:
|
vadmium
pushed a commit
to vadmium/pyelftools
that referenced
this issue
Feb 12, 2014
Various APIs are modified, but in a backwards compatible manner. Should close eliben#3. Original explanation from Mike Frysinger: At runtime, ELFs do not use the section headers at all. Instead, only the program segments and dynamic tags get used. This means you can strip the section table completely from an ELF and have it still work. In practice, people rarely do this, but it's not unheard of. Make the Dynamic tags work even in these cases by loading the strings table the same way the runtime loader does: - parse the symtab address from DT_STRTAB - locate the file offset via the program segments
I have restored this patch for reference: https://github.com/vadmium/pyelftools/compare/vapier |
vadmium
pushed a commit
to vadmium/pyelftools
that referenced
this issue
Feb 17, 2014
Signature of the Dynamic class constructor is modified, but it should be compatible with before. Should close eliben#3. Original explanation from Mike Frysinger: At runtime, ELFs do not use the section headers at all. Instead, only the program segments and dynamic tags get used. This means you can strip the section table completely from an ELF and have it still work. In practice, people rarely do this, but it's not unheard of. Make the Dynamic tags work even in these cases by loading the strings table the same way the runtime loader does: - parse the symtab address from DT_STRTAB - locate the file offset via the program segments
we should be able to close this now that my updated change has been merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moving from bitbucket pull request #11 by Mike Frysinger:
support parsing of dynamic ELFs w/out section headers
At runtime, ELFs do not use the section headers at all. Instead, only
the program segments and dynamic tags get used. This means you can
strip the section table completely from an ELF and have it still work.
In practice, people rarely do this, but it's not unheard of. Make the
Dynamic tags work even in these cases by loading the strings table the
same way the runtime loader does:
In order to avoid circular deps (parsing a dyntag requires walking parsed
dyntags), add a set of internal funcs for returning the raw values.
ave it still work.
The text was updated successfully, but these errors were encountered: