Ghidra is a free tool similar to IDA Pro.
https://ghidra-sre.org/You can extend it with scripts, in Java or Python. I thought we could make some useful ones and collect them here. I'm going to assume everyone wanting to run scripts has already got Ghidra working and loaded the rom dumps and extra memory regions (eg, parts of the rom that get copied to different locations at runtime).
Here's my first useful script, StubNamer.py - you give it a stubs.S file and it names and disassembles the stubs in your listing:
https://drive.google.com/open?id=17QJSAd-72z_Kp_GgoS6Qn1HdOsQVc832In Linux, copy to /home/<your_user>/ghidra_scripts/, then it will be visible under Magiclantern when you open "Display Script Manager" (white triangle in green circle icon in button bar).
Limitations:
- it doesn't define a function at the address, because not all stub addresses are at function starts so I didn't want to force this. Often Ghidra will work out it's a function due to xrefs etc, but sometimes it doesn't. Could be made better by inspecting the disassembly, detecting common function starts, only then defining a function?
- the NSTUB address extraction only handles the simplest case. If it's a computed address, it will fail (and report this in Ghidra console so you can manually define it)