ghidra
ghidra copied to clipboard
mips_gp0_value error
Hi,
I am trying to reverse engineer a firmware and while importing a file i get the following error. I tried the latest public version on windows 10 machine, before posting this apperently it's still not a solved issue.
----- Loading /F:/Users/MONSTER/Downloads/FW/needed/psi -----
Skipping empty section [.mdebug.abi32]
_mips_gp0_value=0x42ab00
Finished importing referenced libraries for: psi
[libc.so.0] -> [/libc.so.0] (previously imported)
----- [psi] Resolve 83 external symbols -----
Resolved 81 symbols to library libc.so.0
Unresolved external symbols which remain: 2
I don't understand what is going on as there is no more information about it. I hope someone can figure out.
It's not an error, just a log message: https://github.com/NationalSecurityAgency/ghidra/blob/bcb825fb029232175625bc85653ec0e810b1252e/Ghidra/Processors/MIPS/src/main/java/ghidra/app/util/bin/format/elf/extend/MIPS_ElfExtension.java#L650-L676
then why it's not resolved in the actual code. there is no other dependency that it says i have to import. so i'm kinda stuck here. as you can see on my previous post it says 2 unresolved external symbols.
then why it's not resolved in the actual code. there is no other dependency that it says i have to import. so i'm kinda stuck here. as you can see on my previous post it says 2 unresolved external symbols.
It is resolved. The symbol _gp
was set set to 0x0042ab00
. The code there is where that value is being assigned. That address is not in a memory block though which is why it is red. This is a common problem for mips binaries. At the moment you will have to create the memory block yourself to make the red markers go away. You can just create an uninitialized memory block starting at _gp
ending at _gp + __heap_size
@ekardon, was this a satisfactory resolution?
At the moment you will have to create the memory block yourself to make the red markers go away. You can just create an uninitialized memory block starting at
_gp
ending at_gp + __heap_size
Would you mind explaining how to do that?
For me, the decompiler is using an offset to this _mips_gp0_value
instead of symbol names. I can see the symbols in the disassembly. Is there any way to fix this for the decompiler?
For me, the decompiler is using an offset to this
_mips_gp0_value
instead of symbol names. I can see the symbols in the disassembly. Is there any way to fix this for the decompiler?
I've just encountered the same issue. Did you ever figure out how to work around this?
I have not.