From 9e77dbfe20c924f14b2a828540729eef1d3022f7 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Fri, 22 Dec 2006 15:19:51 +0100 Subject: [PATCH] Added an assertion to make sure I've really understood the semantics of the ctok32 filter length. --- src/p_vmlinx.cpp | 3 ++- src/p_vmlinz.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p_vmlinx.cpp b/src/p_vmlinx.cpp index 0a3ca42e..5c4b4c20 100644 --- a/src/p_vmlinx.cpp +++ b/src/p_vmlinx.cpp @@ -271,7 +271,8 @@ void PackVmlinuxBase::pack(OutputFile *fo) defineDecompressorSymbols(); defineFilterSymbols(linker, &ft); if (0x40==(0xf0 & ft.id)) { - linker->defineSymbol("filter_length", ph.u_len); // redefine + linker->defineSymbol("filter_length", ft.buf_len); // redefine + assert(ft.buf_len == ph.u_len); } relocateLoader(); diff --git a/src/p_vmlinz.cpp b/src/p_vmlinz.cpp index 4a1e1cf5..57a0a95d 100644 --- a/src/p_vmlinz.cpp +++ b/src/p_vmlinz.cpp @@ -445,7 +445,8 @@ void PackBvmlinuzI386::pack(OutputFile *fo) defineFilterSymbols(linker, &ft); if (0x40==(0xf0 & ft.id)) { - linker->defineSymbol("filter_length", ph.u_len); // redefine + linker->defineSymbol("filter_length", ft.buf_len); // redefine + assert(ft.buf_len == ph.u_len); } defineDecompressorSymbols(); linker->defineSymbol("original_entry", physical_start);