reticulatedpines / magiclantern_simplified

A Git based version of Magic Lantern, for those unwilling or unable to work using Mercurial. The vast majority of branches have been removed, with those thought to be important brought in individually and merged.
GNU General Public License v2.0
142 stars 50 forks source link

Fat binaries for modules? #90

Open reticulatedpines opened 1 year ago

reticulatedpines commented 1 year ago

ARMv7 cams have Thumb, but modules are built only as ARMv5 / ARM, for compatibility reasons. We have a custom loader via tcc anyway, so we could perhaps build these as fat binaries, containing a Thumb and non-Thumb build, with the loader detecting the best choice to load.

The Thumb builds have quite a lot less memory footprint (and presumably some speed improvement, as well as lower I-cache pressure).

ARMv5te supports Thumb (just 1, not 2?) so it might be an option there as well. This might mean three builds per file is optimal, but we have a lot more disk space than memory so I think this would be fine.