-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Sections relocation in object files #4639
Comments
Is this a .o file? Can you possibly attach it? |
That's not a .o file, it's an ELF file. I put the file in a zip, github don't like it |
This is a .o file, you can tell because file(1) identifies it as "relocatable" and it has no program headers. .o files are ELF files; the L in ELF stands for linkable. there is no set standard for how to load .o files into a single address space, they are simply not meant to do that. angr compensates by doing a linking hackjob, which assigns addresses to each loadable section before relocating it and dumping in into memory. It would be possible to specify addresses for each section, but the infrastructure for it in cle simply doesn't exist, and I don't have the cycles to add it right now. I would accept a PR. Probably an easier solution for you in this case would be to simply link this binary into an executable or shared object, and then load that into ghidra and angr. They will match up then, provided you set the correct base address. |
Question
I have a binary that have a problem in its ELF headers, this is creating problem while loading the file. The things is I use ghidra to check some interesting address an try to reach them with the simulation manager in angr, due to the absence of elf headers, the address that I found into ghidra does not match anything in the project loaded by angr.
Is there a way to remap the sections to be consistent with the memory map I have in ghidra ?
This is the memory map in ghidra
this is the sections in angr:
The text was updated successfully, but these errors were encountered: