diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-17 09:49:50 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-18 10:39:36 +0200 |
commit | a1389969db10f65804e766c452a819e173a053dd (patch) | |
tree | 33002ea42c8b85bdf2bc9db395ccc216ba206bcb | |
parent | 51f20205ed899c9b867cc0b9dcd5cd71fa16f50e (diff) | |
download | barebox-a1389969db10f65804e766c452a819e173a053dd.tar.gz barebox-a1389969db10f65804e766c452a819e173a053dd.tar.xz |
pbl: Alias memcpy and memset
With KASan the memcpy/memset functions are instrumented as well, but
some code will still have to call the non instrumented versions __memcpy
and __memset. Add aliases for them to PBL to make them available.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | pbl/string.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pbl/string.c b/pbl/string.c index 46bf0b32b3..e6c0997ebc 100644 --- a/pbl/string.c +++ b/pbl/string.c @@ -6,6 +6,7 @@ #include <linux/types.h> #include <linux/string.h> +#include <linux/compiler.h> void *memcpy(void *__dest, __const void *__src, size_t __n) { @@ -41,6 +42,9 @@ void *memcpy(void *__dest, __const void *__src, size_t __n) return __dest; } +void *__memcpy(void *__dest, __const void *__src, size_t __n) + __alias(memcpy); + void *memmove(void *__dest, __const void *__src, size_t count) { unsigned char *d = __dest; @@ -120,6 +124,9 @@ void *memset(void *s, int c, size_t count) return s; } +void *__memset(void *s, int c, size_t count) + __alias(memset); + /** * strnlen - Find the length of a length-limited string * @s: The string to be sized |