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

Store shentsize in target byte-order.

This commit is contained in:
Markus F.X.J. Oberhumer 2006-11-18 18:25:11 +01:00
parent d9e8c953b1
commit d822b4a62a

View File

@ -1049,7 +1049,7 @@ PackLinuxElf32::generateElfHdr(
h2->ehdr.e_shoff = 0;
assert(get_native16(&h2->ehdr.e_ehsize) == sizeof(Elf32_Ehdr));
assert(get_native16(&h2->ehdr.e_phentsize) == sizeof(Elf32_Phdr));
h2->ehdr.e_shentsize = sizeof(Elf32_Shdr);
set_native16(&h2->ehdr.e_shentsize, sizeof(Elf32_Shdr));
h2->ehdr.e_shnum = 0;
h2->ehdr.e_shstrndx = 0;
@ -1099,7 +1099,7 @@ PackOpenBSDElf32x86::generateElfHdr(
h3->ehdr.e_shoff = 0;
assert(get_native16(&h3->ehdr.e_ehsize) == sizeof(Elf32_Ehdr));
assert(get_native16(&h3->ehdr.e_phentsize) == sizeof(Elf32_Phdr));
h3->ehdr.e_shentsize = sizeof(Elf32_Shdr);
set_native16(&h3->ehdr.e_shentsize, sizeof(Elf32_Shdr));
h3->ehdr.e_shnum = 0;
h3->ehdr.e_shstrndx = 0;
@ -1161,7 +1161,7 @@ PackLinuxElf64::generateElfHdr(
h2->ehdr.e_shoff = 0;
assert(get_native16(&h2->ehdr.e_ehsize) == sizeof(Elf64_Ehdr));
assert(get_native16(&h2->ehdr.e_phentsize) == sizeof(Elf64_Phdr));
h2->ehdr.e_shentsize = sizeof(Elf64_Shdr);
set_native16(&h2->ehdr.e_shentsize, sizeof(Elf64_Shdr));
h2->ehdr.e_shnum = 0;
h2->ehdr.e_shstrndx = 0;