ELFExternalSymbolResolver script missing in release #6814
-
Describe the bug ELFExternalSymbolResolver script missing in release To Reproduce
Expected behavior ELFExternalSymbolResolver is packaged and can be used from the script manager |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 5 replies
-
This has been replaced by the |
Beta Was this translation helpful? Give feedback.
-
Oh, I missed that, because I thought this only works for libaries on disk. Can you give me a hint, how to make Ghidra resolve external symbols in a firmware binary from a mask rom elf image? Adding the mask rom image in the "External Programs" screen doesn't seem to do the job |
Beta Was this translation helpful? Give feedback.
-
In your firmware binary, in the Symbol Tree, are any Imports recognized? If so, are they under |
Beta Was this translation helpful? Give feedback.
-
Well, I don't think it would be recognized as real import anyway. Maybe (I'd need to test it later) when the main binary is elf as well. In my case the main firmware was dumped from a device. The mask rom elf file is provided by Espressif for ESP*. So, basically my main binary is just calling functions in the mask rom region. For now I worked around by exporting both Ghidra objects, main firmware and mask rom elf, as xml, merged the mask rom into the main xml by hand and reimported. That worked very well but is really ugly 😆 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
If the external functions addresses that the main binary are actually correct in the ELF, you may just be able to import the ELF, and then do |
Beta Was this translation helpful? Give feedback.
-
That's actually what I tried in the first place, but Ghidra only let's me import it as a raw binary: So, yes, if Ghidra would allow to load the ELF file into an existing project, that would work. |
Beta Was this translation helpful? Give feedback.
-
I suspect this image does not utilize dynamic libraries which would be identified within the image and therefor cannot be handled with our library support. Such binaries when built use pre-defined function locations defined during the buid process and is effectively pre-linked (i.e., no dynamic linking) and lack external symbol/library details, In such situations it may be neccessary to understand how the binary was built (i.e., tool chain, header files, etc.) and get creative in identifying function symbols and addresses. The CParser may help in parsing header files or another parsing technique may be required to collect the function signatures and associated addresses. Function symbols can then be created with name and signatures. The external library/function processing provided by Ghidra does not really help with such situations. ELF imports that do utilize dynamic linking will generally have either program headers or sections which identify a dynamic table, global offset table (got), procedure linkage table (plt), etc. I see no evidence of such regions in your listings above. ROM dumps/images are generally not ELF |
Beta Was this translation helpful? Give feedback.
Indeed. I guess you are asking for #3307 then?