pbatard / EfiFs

EFI FileSystem drivers
https://efi.akeo.ie
GNU General Public License v3.0
521 stars 79 forks source link

ia32 drivers compiled with MinGW crash QEMU #2

Closed pbatard closed 8 years ago

pbatard commented 8 years ago

This happens when loading the driver. x64 ones are fine, and so are ia32 and x64 ones compiled with MSVC.

pbatard commented 8 years ago

I'm pretty sure this has to do with DLL dependencies that are being inserted, due to not being able to link with -nostdlib. Dependency Walker shows that we have a handful of them.

As explained here the issue is that without stdlib, we're missing an implementation of __umoddi3 and __udivdi3, that are required by ia32/math.c. Thought the compiler would be smart enough not to insert DLL refs, but apparently that is not the case.

I guess we'll need to patch gnu-efi yet again so that we can link with -nostdlib.

pbatard commented 8 years ago

Confirmed not using -nostdlib is the issue. I have submitted a patch to gnu-efi, that should do the trick.