GithubHelp home page GithubHelp logo

Comments (4)

chaoticgd avatar chaoticgd commented on June 1, 2024

It looks like it's trying to apply relocations to a linked ELF file for some reason.

from ghidra-emotionengine-reloaded.

abelbriggs1 avatar abelbriggs1 commented on June 1, 2024

Might be a regression due to #50, looking now

from ghidra-emotionengine-reloaded.

abelbriggs1 avatar abelbriggs1 commented on June 1, 2024

So this seems to be a strange case - this is an executable ELF which is fully linked, but also includes a full relocation table. Since it's fully linked, it already has its relocations applied.

When many MIPS relocations are calculated, the target field of the instruction to be modified is often used as an offset or "addend" which is added to the relocation value. But since the relocation has already been applied in our case, the addend is the relocation itself! For an explicit example, applying a R_MIPS_26 relocation to an already relocated jal instruction will effectively double the target address value. That effect is causing the Ghidra analyzer to completely explode, because it's forced to create functions that don't exist.

Now, why is this only happening after #50? I believe it's because we weren't handling addends correctly according to the MIPS ABI. So applying the relocation to the relocated target would produce the same value.

Thankfully, in your case, I think you can just tell Ghidra to not perform symbol relocation/patching:

image

I tested this with your binary and it seems to analyze perfectly. Can you try this out?

from ghidra-emotionengine-reloaded.

escape209 avatar escape209 commented on June 1, 2024

Yes, it works as expected with Perform Symbol Relocations unchecked.

from ghidra-emotionengine-reloaded.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.