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

Expose the size of the table in the ObjectSymbolTable trait #480

Open
sfackler opened this issue Nov 3, 2022 · 3 comments
Open

Expose the size of the table in the ObjectSymbolTable trait #480

sfackler opened this issue Nov 3, 2022 · 3 comments

Comments

@sfackler
Copy link

sfackler commented Nov 3, 2022

It looks like all of the symbol table implementations expose a length method. It would be great to propagate that up to the read::SymbolTable.

@philipc
Copy link
Contributor

philipc commented Nov 3, 2022

Note that for some formats this length includes auxiliary symbols, so it would be a hint rather than an exact length.

@sfackler
Copy link
Author

sfackler commented Nov 3, 2022

Oh interesting. What I'm really after is the ability to directly binary search on the table for the symbol corresponding to an address rather than having to load all of the symbols into a different data structure. I believe this is doable on ELF objects at least. Is that not possible in other formats?

@philipc
Copy link
Contributor

philipc commented Nov 3, 2022

COFF and XCOFF both have auxiliary symbols, and you can't determine which symbols are auxiliary without parsing in order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants