From b389abd99faaf4cf34bdd0e90239e44646730010 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Thu, 2 Mar 2006 19:13:12 +0000 Subject: [PATCH] PackLinuxElf64amd::getCompressionMethods allows both nrv2b and nrv2e committer: jreiser 1141326792 +0000 --- src/p_lx_elf.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index 5cdb7742..d5fe1e30 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -190,11 +190,16 @@ int const * PackLinuxElf64amd::getCompressionMethods(int method, int level) const { // No real dependency on LE32. - static const int l_method[] = { M_NRV2E_LE32, M_NRV2B_LE32, -1 }; + static const int m_nrv2b[] = { M_NRV2B_LE32, M_NRV2E_LE32, -1 }; + static const int m_nrv2e[] = { M_NRV2E_LE32, M_NRV2B_LE32, -1 }; - /*return Packer::getDefaultCompressionMethods_le32(method, level);*/ - UNUSED(method); UNUSED(level); - return l_method; + if (M_IS_NRV2B(method)) + return m_nrv2b; + if (M_IS_NRV2E(method)) + return m_nrv2e; + if (1==level) + return m_nrv2b; + return m_nrv2e; } int const *