diff options
author | Simon Glass <sjg@chromium.org> | 2025-01-26 11:43:23 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-02-03 16:01:36 -0600 |
commit | 4ca29703906ec28814a6fc09088ca4b01e4f94ca (patch) | |
tree | 2d94971d360e29dfedcaf34c64be06ab7d4de5bc /lib/string.c | |
parent | 6e5b3d4265971a0494c4ef016597f65c41651ed9 (diff) |
lib: Mark memcpy() and memmove() as relocation code
Mark these functions as needed by relocation. These functions are used
to copy data while relocating the next-phase image.
Drop the 'safe' versions from SPL as they are not needed. Change the
static array to a local one, to avoid link errors when trying to access
the data.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/string.c')
-rw-r--r-- | lib/string.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/string.c b/lib/string.c index feae9519f2f..0e0900de8bf 100644 --- a/lib/string.c +++ b/lib/string.c @@ -21,6 +21,7 @@ #include <linux/string.h> #include <linux/ctype.h> #include <malloc.h> +#include <asm/sections.h> /** * strncasecmp - Case insensitive, length-limited string comparison @@ -559,7 +560,7 @@ __used void * memset(void * s,int c,size_t count) * You should not use this function to access IO space, use memcpy_toio() * or memcpy_fromio() instead. */ -__used void * memcpy(void *dest, const void *src, size_t count) +__rcode __used void *memcpy(void *dest, const void *src, size_t count) { unsigned long *dl = (unsigned long *)dest, *sl = (unsigned long *)src; char *d8, *s8; @@ -593,7 +594,7 @@ __used void * memcpy(void *dest, const void *src, size_t count) * * Unlike memcpy(), memmove() copes with overlapping areas. */ -__used void * memmove(void * dest,const void *src,size_t count) +__rcode __used void *memmove(void *dest, const void *src, size_t count) { char *tmp, *s; |