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

Support .a and .rlib static library files #115

Open
nyurik opened this issue Jan 28, 2025 · 2 comments
Open

Support .a and .rlib static library files #115

nyurik opened this issue Jan 28, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@nyurik
Copy link
Contributor

nyurik commented Jan 28, 2025

Is your feature request related to a problem? Please describe.

The .a static library is essentially an ar archive of elf files. I think the file reader could simply merge multiple elf files together when displaying, or some "context" or "stream" concept could be introduced to some screens, allowing switching between individual elf files in a single archive.

To try it out locally, use ar x <file> to extract all .o files, which already can be viewed with binsider

Describe the solution you'd like

Ability to view .a files

Describe alternatives you've considered

using nm and objdump to view file content

@nyurik nyurik added the enhancement New feature or request label Jan 28, 2025
@nyurik nyurik changed the title Support static libraries, e.g. lib___.a files Support static elf libraries lib___.a - archives of elf subfiles Jan 28, 2025
@nyurik nyurik changed the title Support static elf libraries lib___.a - archives of elf subfiles Support static libraries lib___.a - archives of elf subfiles Jan 28, 2025
@orhun
Copy link
Owner

orhun commented Jan 29, 2025

Hey, thanks for creating the issue 👋🏼

Interesting feature request! Would you mind giving me more information about when this would be useful in real world scenario? I'm not that familiar with analyzing .a files (or with .a files for that matter).

To try it out locally, use ar x to extract all .o files, which already can be viewed with binsider

I'm not sure if I understood this correctly, but where would you usually get an .a file? Just wanted to try it out for myself :)

@orhun orhun added the question Further information is requested label Jan 29, 2025
@nyurik
Copy link
Contributor Author

nyurik commented Jan 29, 2025

any compilation right before linking into an executable produces a bunch of .a files. A rust compilation produces .rlib files - which are almost identical to .a (they have some extra metadata i heard). So to try it out, simply look at your target/ dir, e.g. target/debug/libbinsider.rlib - and run ar x target/debug/libbinsider.rlib and do cargo run <one of the extracted files.o>

@nyurik nyurik changed the title Support static libraries lib___.a - archives of elf subfiles Support static libraries lib___.a and lib___.rlib - archives of elf .o files Jan 29, 2025
@nyurik nyurik changed the title Support static libraries lib___.a and lib___.rlib - archives of elf .o files Support lib___.a / lib___.rlib static libs containing .o elf files Jan 29, 2025
@nyurik nyurik changed the title Support lib___.a / lib___.rlib static libs containing .o elf files Support .a and .rlib static library files Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants