edit 12/31/2019 This information has been added to a wiki page
https://chdk.fandom.com/wiki/Ghidra_Version_Tracking_workflow_for_porting--------
Version tracking workflow for porting, loosely based on the "workflow" item in version tracking help.
Pick a similar, already ported cam and the camera to be ported.
Load both dumps as in
https://chdk.setepontos.com/index.php?topic=13718.msg139705#msg139705 do initial analysis.
For the unported camera, build stubs. If copying from an existing port, be sure to remove or nullsub out functions in stubs_entry_2 (they can get picked up in funcs_by_*.csv)
In each dump, run the load stubs script. For the unported camera, exclude stubs_min.S and stubs_entry_2.s. For the ported camera, include all.
Close source tool(s) and open the version tool
Start a new session, picking the ported cam as a source, new cam as destination
Click the + in the toolbar, select the "exact symbol name" correlator and run.
In the list view, click the lightbulb to filter
Uncheck implied matches, and uncheck all sources except Imported and User Defined
Select all, accept. Good accepted matches theoretically help identify other matches. There might be a few bad stubs, but the vast majority should be good.
Reset filters to default
Click the + again, select "exact function mnemonic" match. You can set minimum length to something longer (I used 20).
Once that completes, you can use the search bar on functions not found by the sig finder. If there's a match, it will be shown in the list. This includes not just the exact mnemonic matches, but also implied matches. (screenshot)
You can the source viewer of the ported firmware to jump to missing functions / variables and check whether there is a match.
If you have set up the memory map to include data, this will also find variables as implied matches. (screenshot 2)
The mnemonic matches should also be fairly safe to accept in bulk, especially with a longer minimum length, although there are some larger functions duplicated in multiple locations.