PT_LOAD[0] with ElfXX.Ehdr only
https://github.com/upx/upx/issues/283 modified: p_lx_elf.cpp
This commit is contained in:
parent
c33603e324
commit
593a69ce25
@ -3842,8 +3842,15 @@ int PackLinuxElf32::pack2(OutputFile *fo, Filter &ft)
|
||||
if (ft.id < 0x40) {
|
||||
// FIXME: ?? ft.addvalue += asl_delta;
|
||||
}
|
||||
x.offset += delta;
|
||||
x.size -= delta;
|
||||
if (delta == x.size) { // PT_LOAD[0] with ElfXX.Ehdr only
|
||||
// QBE backend - http://c9x.me/compile/
|
||||
hdr_u_len = 0; // no fiddling necessary!
|
||||
// &ft arg to packExtent will be zero becaue (k != nk_f)
|
||||
}
|
||||
else {
|
||||
x.offset += delta;
|
||||
x.size -= delta;
|
||||
}
|
||||
}
|
||||
// compressWithFilters() always assumes a "loader", so would
|
||||
// throw NotCompressible for small .data Extents, which PowerPC
|
||||
@ -3966,8 +3973,15 @@ int PackLinuxElf64::pack2(OutputFile *fo, Filter &ft)
|
||||
if (ft.id < 0x40) {
|
||||
// FIXME: ?? ft.addvalue += asl_delta;
|
||||
}
|
||||
x.offset += delta;
|
||||
x.size -= delta;
|
||||
if (delta == x.size) { // PT_LOAD[0] with ElfXX.Ehdr only
|
||||
// QBE backend - http://c9x.me/compile/
|
||||
hdr_u_len = 0; // no fiddling necessary!
|
||||
// &ft arg to packExtent will be zero becaue (k != nk_f)
|
||||
}
|
||||
else {
|
||||
x.offset += delta;
|
||||
x.size -= delta;
|
||||
}
|
||||
}
|
||||
// compressWithFilters() always assumes a "loader", so would
|
||||
// throw NotCompressible for small .data Extents, which PowerPC
|
||||
|
||||
Loading…
Reference in New Issue
Block a user