ZIG_DIST_VERSION of 2024-09-17
also https://github.com/upx/upx/issues/847 modified: ../.github/workflows/ci.yml modified: ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh modified: p_lx_elf.cpp modified: stub/src/amd64-linux.elf-entry.S modified: stub/src/amd64-linux.elf-main2.c modified: stub/src/i386-darwin.macho-entry.S plus generated *.h *.map *.dump
This commit is contained in:
+12
-6
@@ -7509,8 +7509,12 @@ void PackLinuxElf64::unpack(OutputFile *fo)
|
||||
if (PT_LOAD64==get_te32(&phdr->p_type)) {
|
||||
unsigned const filesz = get_te64(&phdr->p_filesz);
|
||||
unsigned const offset = get_te64(&phdr->p_offset);
|
||||
if (fo)
|
||||
if (fo) {
|
||||
fo->seek(offset, SEEK_SET);
|
||||
if (total_out < offset) {
|
||||
total_out = offset; // FIXME: can it be re-write?
|
||||
}
|
||||
}
|
||||
if (Elf64_Phdr::PF_X & get_te32(&phdr->p_flags)) {
|
||||
unpackExtent(filesz, fo,
|
||||
c_adler, u_adler, first_PF_X);
|
||||
@@ -7659,8 +7663,7 @@ void PackLinuxElf64::unpack(OutputFile *fo)
|
||||
}
|
||||
unpackExtent(size, fo,
|
||||
c_adler, u_adler, false,
|
||||
is_shlib && ((phdr[j].p_offset != hi_offset)));
|
||||
// FIXME: should not depend on is_shlib ?
|
||||
(hi_offset != get_te64(&phdr[j].p_offset)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8677,8 +8680,12 @@ void PackLinuxElf32::unpack(OutputFile *fo)
|
||||
if (PT_LOAD32==get_te32(&phdr->p_type)) {
|
||||
unsigned const filesz = get_te32(&phdr->p_filesz);
|
||||
unsigned const offset = get_te32(&phdr->p_offset);
|
||||
if (fo)
|
||||
if (fo) {
|
||||
fo->seek(offset, SEEK_SET);
|
||||
if (total_out < offset) {
|
||||
total_out = offset; // FIXME: can it be re-write?
|
||||
}
|
||||
}
|
||||
if (Elf32_Phdr::PF_X & get_te32(&phdr->p_flags)) {
|
||||
unpackExtent(filesz, fo,
|
||||
c_adler, u_adler, first_PF_X);
|
||||
@@ -8827,8 +8834,7 @@ void PackLinuxElf32::unpack(OutputFile *fo)
|
||||
}
|
||||
unpackExtent(size, fo,
|
||||
c_adler, u_adler, false,
|
||||
is_shlib && ((phdr[j].p_offset != hi_offset)));
|
||||
// FIXME: should not depend on is_shlib ?
|
||||
(hi_offset != get_te32(&phdr[j].p_offset)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user