Skip to content
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

what's required to support shared libs? #355

Open
milianw opened this issue Sep 21, 2023 · 1 comment
Open

what's required to support shared libs? #355

milianw opened this issue Sep 21, 2023 · 1 comment
Labels
core Core Framework (Process Control, Instruction Patching etc.)

Comments

@milianw
Copy link
Contributor

milianw commented Sep 21, 2023

Hey all,

this sounds like a great addition to the tooling landscape, thank you very much! I would love to try it out, but your constraints page says:

Statically linked binaries only

This is sadly a deal breaker for my world. Can someone share some details on what's blocking shared library support? Maybe I can help you out and add the required bits and pieces for that - unless you are saying this is conceptually impossible (why?).

Thanks again!

@ttreyer
Copy link
Contributor

ttreyer commented Sep 21, 2023

Hey @milianw,

Thanks a lot for having a look at OI!

Since we focused on statically linked binary, we really haven't tested how Object Introspection handles shared libraries. So we could certainly do with some help for supporting them 🙂

The two area that should be affected by shared libraries are: locating Symbols and reading Debug Info. We rely on elfutils' libdwfl and drgn's libdrgn to handle these two tasks for us. I believe they're both able to handle multiple executables/libraries, but OI might not leverage their APIs to do so.

What I would suggest doing is:

  1. Try oid on a dynamically linked executable.
  2. If it doesn't work then have a look at the SymbolService in oi/SymbolService.{h,cpp}:
    a. Ensure SymbolService::loadModules loads the shared libraries in libdwfl.
    b. Ensure SymbolService::getDrgnProgram loads the Debug Infos of the shared libraries into libdrgn.

We'll happily work with you on this feature and feel free to get in touch if you have any question!

@ttreyer ttreyer added the core Core Framework (Process Control, Instruction Patching etc.) label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core Framework (Process Control, Instruction Patching etc.)
Projects
None yet
Development

No branches or pull requests

2 participants