Hi all,

Following from https://sourceforge.net/p/mingw-w64/bugs/596/
I believe the version of ntdll.def for 32 bit Windows to be wrong.

It incorrectly has functions marked as data. For instance `atan`.

$ find -iname ntdll.def | xargs grep atan
./mingw-w64-crt/lib32/ntdll.def:atan DATA
./mingw-w64-crt/lib64/ntdll.def:atan
./mingw-w64-crt/libarm32/ntdll.def:atan

on the 64bit one it is correctly marked as a function whereas on the 32bit one 
it's marked as data.

The consequence of this is that on 32 bit versions you have to link mingwex 
before ntdll. If you don't,
when using any of these math functions you get a link error:

mingw/bin/../lib/gcc/i686-w64-mingw32/5.2.0/../../../../i686-w64-mingw32/lib/../lib/libmsvcrt.a(dohds01059.o):(.idata$5+0x0):
 multiple definition of `_imp__atan'
mingw/bin/../lib/gcc/i686-w64-mingw32/5.2.0/../../../../i686-w64-mingw32/lib/../lib/libntdll.a(dgjjs01967.o):(.idata$5+0x0):
 first defined here

because when resolving `_atan` it finds a relocation to `_imp_atan` and can't 
load it because it saw one already in `libntdll.a`. 

This works fine for x86_64 because it then just uses the entire definition from 
`ntdll.a` instead.

If it's by design, then why only x86? Should the import library even contain 
these undocumented functions?

Regards,
Tamar


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to