There is no local wrapper function named _onexit in libmsvcrt.a or libmingwex.a, and the declaration in headers don't include any dllimport declaration.
This makes i386 match the other architectures, and fixes linking to this function with lld. (GNU ld manages to resolve calls to _onexit into __imp__onexit when there is no other version of the function available anywhere though.) The DATA declaration in msvcrt.def.in can be traced back to the original add of that file in 2008. Signed-off-by: Martin Storsjö <mar...@martin.st> --- mingw-w64-crt/lib-common/msvcrt.def.in | 2 +- mingw-w64-crt/lib32/msvcr80.def.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in index 2359beb..1a1db2b 100644 --- a/mingw-w64-crt/lib-common/msvcrt.def.in +++ b/mingw-w64-crt/lib-common/msvcrt.def.in @@ -880,7 +880,7 @@ _msize F_ARM_ANY(_msize_dbg) _nextafter F_X64(_nextafterf) -_onexit F_I386(DATA) +_onexit _open _open_osfhandle _osplatform DATA diff --git a/mingw-w64-crt/lib32/msvcr80.def.in b/mingw-w64-crt/lib32/msvcr80.def.in index 28fa000..f5e9555 100644 --- a/mingw-w64-crt/lib32/msvcr80.def.in +++ b/mingw-w64-crt/lib32/msvcr80.def.in @@ -349,7 +349,7 @@ _mkdir _mktemp _msize _nextafter -_onexit DATA +_onexit _open _open_osfhandle _osver DATA -- 2.7.4 ------------------------------------------------------------------------------ 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 Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public