Thanks for sharing this!
You are correct, the current implementation of the patcher does not remove the unnecessary calls (in fact it does but only in firmwares for a couple of latest device models).
At first, I simply didn't care about optimizing the patched code - all I wanted was to make it work correctly
And now it's too late. See, if I change the replacement patterns in the patcher, it would be necessary to re-test the firmwares in all devices. That means a lot of error-prone work and possibly bricked GPSes.
So I prefer to make slightly better patterns for newly released devices, and for new firmwares where the old patterns refuse to work (from time to time Garmin makes more or less radical changes in the JNX loading routine).
I'll change the pattern used for Dakota in the next release of the patcher, so it will make the minimalistic code changes.
The patch won't be simpler, because no offsets are hardcoded in the patcher, the regular expressions search is made instead, and the call offsets are simply skipped in the patterns.
Bookmarks