[PATCH v2] loader: Add support for ARM linux in the preloader
martin at martin.st
Tue Aug 3 06:50:03 CDT 2021
On Tue, 3 Aug 2021, Jacek Caban wrote:
> Hi Martin,
> On 8/3/21 11:46 AM, Martin Storsjö wrote:
>> As the preloader is linked with -nodefaultlibs, we need to provide
>> builtin helpers for division on arm (that normally are provided by
>> libgcc or compiler-rt).
> I wonder how hard it would be to avoid using divisions in preloader code
> instead. If that's not an option, maybe we could have a naive version of
> those helpers in C.
Ok, I'll give that a shot. Yeah that sounds like it would be less of a
mess than adding these.
> As a side note, we should probably have those helpers in winecrt0 for PE
> targets, but that wouldn't help preloader for which I think it would be nice
> to use a simpler solution, if possible.
Yep - currently it's possible to build in PE mode for ARM if you build
with a mingw compiler that has compiler-rt builtins, but if building in
MSVC mode, you run into the fact that these are missing. I did a shot at
importing the missing ones from compiler-rt into winecrt0, but one needs a
pretty significant number of them:
Importing all of those from compiler-rt requires pulling in 27 new files
from there - which is pretty unwieldy.
More information about the wine-devel