summaryrefslogtreecommitdiff
path: root/lib/gunzip.c
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-01-26 11:43:24 -0700
committerTom Rini <[email protected]>2025-02-03 16:01:36 -0600
commit5c751dc09128b6ca7dc12d6aec665f965905ab29 (patch)
treed8ea5707c3295907a14abded6792ab3603c5cf1d /lib/gunzip.c
parent4ca29703906ec28814a6fc09088ca4b01e4f94ca (diff)
lib: Mark gunzip as relocation code
Mark the gunzip code as needed by relocation. This is used to decompress the next-phase image. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'lib/gunzip.c')
-rw-r--r--lib/gunzip.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gunzip.c b/lib/gunzip.c
index e71d8d00ccb..52007715bda 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -15,6 +15,7 @@
#include <u-boot/crc.h>
#include <watchdog.h>
#include <u-boot/zlib.h>
+#include <asm/sections.h>
#define HEADER0 '\x1f'
#define HEADER1 '\x8b'
@@ -43,7 +44,7 @@ void gzfree(void *x, void *addr, unsigned nb)
free (addr);
}
-int gzip_parse_header(const unsigned char *src, unsigned long len)
+__rcode int gzip_parse_header(const unsigned char *src, unsigned long len)
{
int i, flags;
@@ -71,7 +72,7 @@ int gzip_parse_header(const unsigned char *src, unsigned long len)
return i;
}
-int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp)
+__rcode int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp)
{
int offset = gzip_parse_header(src, *lenp);
@@ -274,8 +275,8 @@ out:
/*
* Uncompress blocks compressed with zlib without headers
*/
-int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
- int stoponerr, int offset)
+__rcode int zunzip(void *dst, int dstlen, unsigned char *src,
+ unsigned long *lenp, int stoponerr, int offset)
{
z_stream s;
int err = 0;