Closed Tupelov closed 3 years ago
It's on the heap, there won't be anything there. If you wan't you can create an uninitialized memory block from the Ghidra user interface in the memory map window (Window->Memory Map
). After creating it you should be able to go to the address.
Here I manually added a reference. I dont think it would make sense for the heap to be referenced by gp since it's usually put in the middle of the data like so The heap is usually started at the end of bss I don't mean any offense I just wanna clear misinformation :)
Oh. I misunderstood the issue when I saw the symbol in the output.
Have you run the constant propagation analyzer? If the magic gp symbol (I forget the actual name) is defined then it should automatically be taken care of during analysis.
I actually thought that gp was the start of the heap. I've never reversed anything that actually used it so I just learned something new.
Yeah its used so that you can load address from memory in a single instruction as long as they are at a offset of−32,768 to 32,767 from gp using something like sw,lw etc. rather than use lui + addiu so it's pretty important when it comes to commercial stuff.
I can't actually find Constant propagation analysis inside my analyzer window and it seems that it wouldn't help in this situation as it seems to analyze pointing to addresses with multiple instructions and gp accesses are usually only done with one
Ok it seems like my eyes weren't working I found the option ._. Looks like it fixed it although there are still some lieing around so I'll have to check more
I'll close this issue but for reference "MIPS-R5900 Constant Reference Analyzer" is what fixed it. Thanks for the help :)
I'll close this issue but for reference "MIPS-R5900 Constant Reference Analyzer" is what fixed it. Thanks for the help :)
This analyzer should be enabled by default. Was this not the case?
Looks like it is on by default when I look at it. I'm not sure why it didn't work when I analyzed the file at the start. I've been having this issue over several versions of the extension (with different projects).