StdLib/LibC ARM AARCH64: do not redefine compiler intrinsics
The memset() function is a compiler intrinsic on AARCH64 and ARM, and so is memmove() on ARM. Usually, redefining them as LibC currently does is not a problem since only one version will be selected at link time from the various static libraries that provide implementations. However, under LTO, this is slightly different, since explicit references (in the C code) and implicit references (emitted by the compiler backend) may resolve to different versions (LTO vs non-LTO), causing conflicts. So simply omit them for ARM/AARCH64 resp. ARM. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
extern char *sys_errlist[];
|
||||
|
||||
#if !((defined(MDE_CPU_ARM) || defined(MDE_CPU_AARCH64)) && defined(__GNUC__))
|
||||
/** The memset function copies the value of c (converted to an unsigned char)
|
||||
into each of the first n characters of the object pointed to by s.
|
||||
|
||||
@@ -36,6 +37,7 @@ memset(void *s, int c, size_t n)
|
||||
{
|
||||
return SetMem( s, (UINTN)n, (UINT8)c);
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
strerror_r(int errnum, char *buf, size_t buflen)
|
||||
|
Reference in New Issue
Block a user