From c76c07aea044c00865faa86b2b5947b798eb07e3 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Fri, 24 Jan 2003 20:53:44 +0000 Subject: [PATCH] prepare to allow multiple decompressors and multiple unfilters committer: jreiser 1043441624 +0000 --- src/stub/l_lx_elf.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/stub/l_lx_elf.c b/src/stub/l_lx_elf.c index c04e845c..f9d4a690 100644 --- a/src/stub/l_lx_elf.c +++ b/src/stub/l_lx_elf.c @@ -108,11 +108,12 @@ do_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) typedef void f_unfilter( nrv_byte *, // also addvalue nrv_uint, - unsigned cto8 // junk in high 24 bits + unsigned cto8, // junk in high 24 bits + unsigned ftid ); typedef int f_expand( const nrv_byte *, nrv_uint, - nrv_byte *, nrv_uint * ); + nrv_byte *, nrv_uint *, unsigned ); static void unpackExtent( @@ -151,7 +152,8 @@ ERR_LAB if (h.sz_cpr < h.sz_unc) { // Decompress block nrv_uint out_len; - int const j = (*f_decompress)(xi->buf, h.sz_cpr, xo->buf, &out_len); + int const j = (*f_decompress)(xi->buf, h.sz_cpr, xo->buf, &out_len, + h.b_method); if (j != 0 || out_len != (nrv_uint)h.sz_unc) err_exit(7); // Skip Ehdr+Phdrs: separate 1st block, not filtered @@ -159,7 +161,7 @@ ERR_LAB && ((512 < out_len) // this block is longer than Ehdr+Phdrs || (xo->size==(unsigned)h.sz_unc) ) // block is last in Extent ) { - (*f_unf)(xo->buf, out_len, h.b_cto8); + (*f_unf)(xo->buf, out_len, h.b_cto8, h.b_ftid); } xi->buf += h.sz_cpr; xi->size -= h.sz_cpr;