From 6e5b3d4265971a0494c4ef016597f65c41651ed9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 26 Jan 2025 11:43:22 -0700 Subject: lib: Mark lz4 as relocation code Mark the lz4 decompression code as needed by relocation. This is used to decompress 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 a crash errors when trying to access the data from relocated code. Make this conditional to avoid a code-size increase when SPL_RELOC is not used/ Signed-off-by: Simon Glass --- lib/lz4_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/lz4_wrapper.c') diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c index 4d48e7b0e8b..b1204511170 100644 --- a/lib/lz4_wrapper.c +++ b/lib/lz4_wrapper.c @@ -15,7 +15,7 @@ #define LZ4F_BLOCKUNCOMPRESSED_FLAG 0x80000000U -int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn) +__rcode int ulz4fn(const void *src, size_t srcn, void *dst, size_t *dstn) { const void *end = dst + *dstn; const void *in = src; -- cgit v1.2.3