diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-05 13:33:37 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-09-05 15:38:53 +0100 |
commit | bc54e50e0fe03c570014f363b547426913e92449 (patch) | |
tree | 16fbac64fe38cb05de09e45eb5d7752503eb9692 /ArmPkg | |
parent | 70c368e26f79ba4d0867090b88d48b86884e6ab2 (diff) | |
download | edk2-bc54e50e0fe03c570014f363b547426913e92449.tar.gz edk2-bc54e50e0fe03c570014f363b547426913e92449.tar.bz2 edk2-bc54e50e0fe03c570014f363b547426913e92449.zip |
ArmPkg/CompilerIntrinsicsLib ARM: make memset() weak again
After the recent update of CompilerIntrinsicsLib, our memset() is no
longer emitted as a weak symbol. On ARM, this may cause problems when
combining this library with another library that supplies memset() [e.g.,
CryptoPkg/IntrinsicLib], due to the fact that the object also supplies
the __aeabi_memXXX entry points, which can only be satisfied by this
object. So make our memset() weak again, to let the other implementation
take precedence.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg')
-rw-r--r-- | ArmPkg/Library/CompilerIntrinsicsLib/memset.c | 9 |
1 files changed, 9 insertions, 0 deletions
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); |