NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
50.68k stars 5.78k forks source link

Incorrect handling of R_PPC_REL24 (PPC relocation type 0xA) #1364

Open aboood40091 opened 4 years ago

aboood40091 commented 4 years ago

Describe the bug Ghidra handles relocation type R_PPC_REL24 incorrectly, leading to it pointing to invalid addresses.

To Reproduce Load an ELF with R_PPC_REL24 relocations. For me, it was an ELF with dynamically imported functions.

Expected behavior Correct relocation so that Ghidra would point to the right addresses.

Screenshots Example: image The correct address can be seen in the symbol table: image

Attachments

Environment (please complete the following information):

Additional context

aboood40091 commented 4 years ago

Importing using this seems to fix it: https://github.com/Maschell/GhidraRPXLoader

Which honestly sucks, since if I want to move to the file imported using the plugin, it would mean I'd have to manually move over my labels, defined data and strings, structures, edited and overriden function signatures, etc...

Is there a way to automatically move all of that over?