[LLVMdev] lli/JIT missing libgcc symbols on Mingw32/x86
Julien Lerouge
jlerouge at apple.com
Thu Jun 5 15:32:47 PDT 2008
Hello,
I have a bytecode doing 64 bits division and on Mingw32/x86, lli
complains it cannot resolve __udivdi3 when running it.
Those symbols are all part of libgcc and all present in lli, but they
cannot be found by SearchForAddressOfSymbol (not in any DLL). To
workaround that, I explicitely define them in Win32/DynamicLibrary.inc
if the current target is Mingw32 (patch attached).
Anybody had this problem before ? Is this a proper fix ?
Thanks,
Julien
--
Julien Lerouge
PGP Key Id: 0xB1964A62
PGP Fingerprint: 392D 4BAD DB8B CE7F 4E5F FA3C 62DB 4AA7 B196 4A62
PGP Public Key from: keyserver.pgp.com
-------------- next part --------------
Index: lib/System/Win32/DynamicLibrary.inc
===================================================================
--- lib/System/Win32/DynamicLibrary.inc (revision 51993)
+++ lib/System/Win32/DynamicLibrary.inc (working copy)
@@ -134,6 +134,21 @@
#if defined(__MINGW32__)
EXPLICIT_SYMBOL_DEF(_alloca);
EXPLICIT_SYMBOL_DEF(__main);
+ EXPLICIT_SYMBOL_DEF(__ashldi3);
+ EXPLICIT_SYMBOL_DEF(__ashrdi3);
+ EXPLICIT_SYMBOL_DEF(__cmpdi2);
+ EXPLICIT_SYMBOL_DEF(__divdi3);
+ EXPLICIT_SYMBOL_DEF(__eprintf);
+ EXPLICIT_SYMBOL_DEF(__fixdfdi);
+ EXPLICIT_SYMBOL_DEF(__fixsfdi);
+ EXPLICIT_SYMBOL_DEF(__fixunsdfdi);
+ EXPLICIT_SYMBOL_DEF(__fixunssfdi);
+ EXPLICIT_SYMBOL_DEF(__floatdidf);
+ EXPLICIT_SYMBOL_DEF(__floatdisf);
+ EXPLICIT_SYMBOL_DEF(__lshrdi3);
+ EXPLICIT_SYMBOL_DEF(__moddi3);
+ EXPLICIT_SYMBOL_DEF(__udivdi3);
+ EXPLICIT_SYMBOL_DEF(__umoddi3);
#elif defined(_MSC_VER)
EXPLICIT_SYMBOL_DEF(_alloca_probe);
#endif
@@ -157,6 +172,21 @@
{
EXPLICIT_SYMBOL(_alloca);
EXPLICIT_SYMBOL(__main);
+ EXPLICIT_SYMBOL(__ashldi3);
+ EXPLICIT_SYMBOL(__ashrdi3);
+ EXPLICIT_SYMBOL(__cmpdi2);
+ EXPLICIT_SYMBOL(__divdi3);
+ EXPLICIT_SYMBOL(__eprintf);
+ EXPLICIT_SYMBOL(__fixdfdi);
+ EXPLICIT_SYMBOL(__fixsfdi);
+ EXPLICIT_SYMBOL(__fixunsdfdi);
+ EXPLICIT_SYMBOL(__fixunssfdi);
+ EXPLICIT_SYMBOL(__floatdidf);
+ EXPLICIT_SYMBOL(__floatdisf);
+ EXPLICIT_SYMBOL(__lshrdi3);
+ EXPLICIT_SYMBOL(__moddi3);
+ EXPLICIT_SYMBOL(__udivdi3);
+ EXPLICIT_SYMBOL(__umoddi3);
EXPLICIT_SYMBOL2(alloca, _alloca);
#undef EXPLICIT_SYMBOL
More information about the llvm-dev
mailing list