-
Notifications
You must be signed in to change notification settings - Fork 44
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
adding local types to ELF? #2
Comments
Hi saidelike! I'll study if exists any form to add local types in the .symtab section, and in in that case, try to export types from IDA and radare2, but I think it is not possible (https://refspecs.linuxbase.org/elf/gabi4+/ch4.symtab.html). Many thanks for you issue! :) Regards |
Hi danigargu, Thanks for the answer. I looked as well and as you said it is not in the As a reference, this is how I listed a specific type in an ELF using
To list them all and save the result in a file, we can use the following command:
Alternatively, objdump can be used to parse the
We get something like that. I only show the 2 first members (
I honestly don't know if the ELF parser you used (based on ROPgadget) supports parsing the [2] http://stackoverflow.com/questions/5954140/dumping-c-structure-sizes-from-elf-object-file |
Hi,
ida-syms2elf supports exporting function names, label, etc. I was able to import the symbols in gdb which is really cool. Would it be possible to add local types as well? Eg in GDB, it is then possible to import them using "add-symbol-file", the same method I use to import function names, label, etc.
For example, if we have the following type:
In GDB, we don't have the type by default:
After importing the file containing the local types, we would be able to print the structure elements:
Regards
saidelike
[1] http://stackoverflow.com/questions/7272558/can-we-define-a-new-data-type-in-a-gdb-session
The text was updated successfully, but these errors were encountered: