-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add support for STT_GNU_IFUNC
and STT_OBJECT
ELF symbols types
#499
Conversation
The SymType enum is really fairly generic and not specific to the inspect set of APIs. As such, it makes more sense to have it be defined in and exposed by the library itself as opposed to a sub-module. This change moves it out of the inspect module and into lib.rs. Signed-off-by: Daniel Müller <deso@posteo.net>
The SymType enum may show up in both input and output contexts. E.g., in the inspect API it is used to determine what symbols to report and at the same time it is used to report the type of a symbol. Having an 'Unknown' variant really only makes sense in an output context. To make this variant less confusing, rename it to 'Undefined', which elicits reasonable associations in both contexts. Signed-off-by: Daniel Müller <deso@posteo.net>
Introduce the Elf64_Sym::matches() helper function that will allow us to more easily support properly handling ELF symbols representing variables as well as indirect functions down the line. Signed-off-by: Daniel Müller <deso@posteo.net>
So far we have been caching all ELF symbols inside ElfParser objects. That's arguably a bit of a waste, memory-wise. With this change we make sure to keep around only those that the library supports and knows what to do with. Signed-off-by: Daniel Müller <deso@posteo.net>
So far the library was only concerned with support function symbols for the various formats. With this change we add support for reporting & querying ELF symbols representing variables as well. Signed-off-by: Daniel Müller <deso@posteo.net>
Add support for indirect functions to our ELF parser logic, such that they are treated as regular functions from blazeym's perspective. Closes: #210 Signed-off-by: Daniel Müller <deso@posteo.net>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #499 +/- ##
=========================================
+ Coverage 0 93.44% +93.44%
=========================================
Files 0 45 +45
Lines 0 7875 +7875
=========================================
+ Hits 0 7359 +7359
- Misses 0 516 +516 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Please see individual commits for descriptions.