1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Fix ::pack3 for shared library.

This commit is contained in:
John Reiser 2011-06-06 20:00:43 -07:00
parent 21924bf022
commit cfa6c8ddf6

View File

@ -252,7 +252,7 @@ void PackLinuxElf32::pack3(OutputFile *fo, Filter &ft)
set_te32(&elfout.phdr[0].p_memsz, sz_pack2 + lsize);
if (0!=xct_off) { // shared library
Elf32_Phdr *phdr = phdri;
unsigned off = sz_pack2;
unsigned off = fo->st_size();
unsigned off_init = 0; // where in file
unsigned va_init = sz_pack2; // virtual address
unsigned rel = 0;
@ -329,7 +329,7 @@ void PackLinuxElf64::pack3(OutputFile *fo, Filter &ft)
set_te64(&elfout.phdr[0].p_memsz, sz_pack2 + lsize);
if (0!=xct_off) { // shared library
Elf64_Phdr *phdr = phdri;
unsigned off = sz_pack2;
unsigned off = fo->st_size();
unsigned off_init = 0; // where in file
acc_uint64l_t va_init = sz_pack2; // virtual address
acc_uint64l_t rel = 0;