-
Notifications
You must be signed in to change notification settings - Fork 716
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
Request: Allow opening executables without loading symbols #987
Comments
cc @mmat11. Maybe we could make loading the symbol table lazy by default? If possible I'd like to avoid adding extra API. |
Besides lazy loading of symbols from executables, |
@florianl are you still refering to kprobe-type programs? could you make an example of how the new API would look like? |
I should've asked earlier: you don't need to load symbols because you already parse them yourself, or is there another way to get the addresses? |
I can only speak for the use cases I know. Using symbols to attach something is the most easy and straight forward one. But there are use cases where symbols are not available or there are known issues, like iovisor/bcc#1320. Anyway - getting the correct address + offset combination can also be provided by external tools like disassemblers.
At the moment Executable.Uprobe(..) or Executable.Uretprobe(..) require
Naming, like |
Another example would be a Go binary with symbols stripped, but still has the Go symbol and line number tables. |
@lmb Indeed, in my case I'm using an external disassembler to find the required addresses. |
@florianl can you create an issue to track not requiring symbol? |
Hey everyone!
I have a request for a use case which might seem weird at start. I would like for link.OpenExecutable to have an optional flag or configuration which skips the symbol loading phase.
This might seem weird, but it's already accepted by the community that certain situations require the users to know the symbols by themselves. This is why the library already supports passing arbitrary address+offset pairs when placing uprobes.
A real life example of this is problem is probing golang processes - since golang has known issues with uretprobes, the current popular replacement to a uretprobe is manually finding the return addresses of the probed function and applying uprobes to every single return instruction.
This method works perfectly with the address+offset methods, but makes the loading of symbols uneeded to begin with.
The reason this is even an issue is that symbol tables tend to be large, especially when analyzing golang processes; skipping the loading could dramatically increase memory efficiency for some programs, especially when probing many processes.
Thank you and let me know what you think!
The text was updated successfully, but these errors were encountered: