[CRT] Add abs and labs to CRT lib

[MSVCRT] Explicitly pull in _vsnprintf, bsearch and strcspn from CRT, to prevent the MS linker from exporting stubs from libntdll instead.
See CORE-10753

svn path=/trunk/; revision=70425
This commit is contained in:
Timo Kreuzer
2015-12-26 17:13:08 +00:00
parent 060e447a77
commit 31adefcf04
2 changed files with 16 additions and 0 deletions
+14
View File
@@ -125,4 +125,18 @@ DllMain(PVOID hinstDll, ULONG dwReason, PVOID reserved)
return TRUE;
}
/* FIXME: This hack is required to prevent the VC linker from linking these
exports to the functions from libntdll. See CORE-10753 */
#ifdef _MSC_VER
#ifdef _M_IX86
#pragma comment(linker, "/include:__vsnprintf")
#pragma comment(linker, "/include:_bsearch")
#pragma comment(linker, "/include:_strcspn")
#else
#pragma comment(linker, "/include:_vsnprintf")
#pragma comment(linker, "/include:bsearch")
#pragma comment(linker, "/include:strcspn")
#endif // _M_IX86
#endif // _MSC_VER
/* EOF */
+2
View File
@@ -34,6 +34,7 @@ list(APPEND CRT_SOURCE
float/nafter.c
float/scalb.c
locale/locale.c
math/abs.c
math/acos.c
math/adjust.c
math/asin.c
@@ -51,6 +52,7 @@ list(APPEND CRT_SOURCE
math/j0_y0.c
math/j1_y1.c
math/jn_yn.c
math/labs.c
math/ldiv.c
math/logf.c
math/modf.c