X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ArmPkg%2FLibrary%2FCompilerIntrinsicsLib%2Fmemset.c;fp=ArmPkg%2FLibrary%2FCompilerIntrinsicsLib%2Fmemset.c;h=0d837fcecf0916de11462891c2bb440a852017cf;hp=3d417d797242d9a168a71ca565f8d6ce1e02cd90;hb=bc54e50e0fe03c570014f363b547426913e92449;hpb=70c368e26f79ba4d0867090b88d48b86884e6ab2 diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c index 3d417d7972..0d837fcecf 100644 --- a/ArmPkg/Library/CompilerIntrinsicsLib/memset.c +++ b/ArmPkg/Library/CompilerIntrinsicsLib/memset.c @@ -31,6 +31,15 @@ void *memset(void *dest, int c, size_t n); #ifdef __arm__ +// +// Other modules (such as CryptoPkg/IntrinsicLib) may provide another +// implementation of memset(), which may conflict with this one if this +// object was pulled into the link due to the definitions below. So make +// our memset() 'weak' to let the other implementation take precedence. +// +__attribute__((__weak__)) +void *memset(void *dest, int c, size_t n); + void __aeabi_memset(void *dest, size_t n, int c) { __memset(dest, c, n);