mirror of https://github.com/acidanthera/audk.git
ArmPkg/CompilerIntrinsicsLib: make the default memset() weak
The ARM compiler intrinsics library defines __aeabi_memset() and memset() in the same object, which means that both will be pulled in if either is referenced. The IntrinsicLib in CryptoPkg defines its own, preferred memset(), which may clash with our memset(). So make our version weak. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
parent
59ceaa0a87
commit
f8c51389c6
|
@ -40,6 +40,14 @@ ASM_PFX(__aeabi_memset):
|
||||||
# IN UINT32 Character,
|
# IN UINT32 Character,
|
||||||
# IN UINT32 Size
|
# IN UINT32 Size
|
||||||
# );
|
# );
|
||||||
|
//
|
||||||
|
// This object may be pulled in to satisfy an undefined reference to
|
||||||
|
// __aeabi_memset above, but in some cases, memset() is already provided
|
||||||
|
// by another library (i.e., CryptoPkg/IntrinsicLib), in which case we
|
||||||
|
// prefer the other version. So allow this one to be overridden by
|
||||||
|
// giving it weak linkage.
|
||||||
|
//
|
||||||
|
.weak memset
|
||||||
ASM_PFX(memset):
|
ASM_PFX(memset):
|
||||||
subs ip, r2, #0
|
subs ip, r2, #0
|
||||||
bxeq lr
|
bxeq lr
|
||||||
|
|
Loading…
Reference in New Issue