CryptoPkg: Fix possible unresolved external symbol issue.
The compiler (visual studio) may optimize some explicit strcmp call in openssl source to use the intrinsic memcmp call. In CrtLibSupport.h, we just use #define to mapping memcmp to CompareMem API. So in Link phase, this kind of intrinsic optimization will cause the "unresolved external symbol" error. For example: OpensslLib.lib(v3_utl.obj) : error LNK2001: unresolved external symbol _memcmp This patch will keep the memcmp mapping, and provide extra Intrinsic memcmp wrapper to satisfy the symbol link. Cc: Ting Ye <ting.ye@intel.com> Cc: Feng Tian <feng.tian@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long <qin.long@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
@@ -133,6 +133,7 @@ void *malloc (size_t);
|
||||
void *realloc (void *, size_t);
|
||||
void free (void *);
|
||||
void *memset (void *, int, size_t);
|
||||
int memcmp (const void *, const void *, size_t);
|
||||
int isdigit (int);
|
||||
int isspace (int);
|
||||
int isxdigit (int);
|
||||
|
Reference in New Issue
Block a user