-
Notifications
You must be signed in to change notification settings - Fork 26
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
how can I get elf type using c api #644
Comments
Can you elaborate on your workflow, what you are trying to achieve, and why the ELF type would have relevance for that? |
I write a progarm like profile (https://github.com/libbpf/libbpf-bootstrap/blob/master/examples/c/profile.c). I want to profile c++ program. The c++ program split debuginfo from binary : objcopy --only-keep-debug my_program my_program.debug so I need: In pharse 2, different elf type like ET_DYN or ET_EXEC have different way to convert. For ET_EXEC type, I can directly convert using blaze_symbolize_elf_virt_offsets For ET_DYN type, I need call blaze_normalize_user_addrs before blaze_symbolize_elf_virt_offsets |
I don't believe that is true, the mechanism is the same for all types.
Split debug info support has not yet been implemented for |
I can get elf type like:
readelf -h profile
ELF Header:
Type: DYN (Position-Independent Executable file)
It's very important to convert address to symbol.
but I read c api document https://docs.rs/blazesym-c/latest/blazesym_c/fn.blaze_inspect_syms_elf.html, I don't find api to get the type of elf files
The text was updated successfully, but these errors were encountered: