mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
fix elf32arm unmapping hatch
This commit is contained in:
parent
717fd57ce1
commit
537b78d564
|
@ -28,8 +28,8 @@
|
|||
|
||||
|
||||
#define LINUX_ELF32ARM_FOLD_SIZE 1952
|
||||
#define LINUX_ELF32ARM_FOLD_ADLER32 0xcc092634
|
||||
#define LINUX_ELF32ARM_FOLD_CRC32 0x7922ed5f
|
||||
#define LINUX_ELF32ARM_FOLD_ADLER32 0x11fa2723
|
||||
#define LINUX_ELF32ARM_FOLD_CRC32 0x7a128d81
|
||||
|
||||
unsigned char linux_elf32arm_fold[1952] = {
|
||||
127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
|
||||
|
@ -132,7 +132,7 @@ unsigned char linux_elf32arm_fold[1952] = {
|
|||
176, 49,218,225, 3, 0, 83,227, 36, 0,157, 21,199,254,255, 27, /* 0x 610 */
|
||||
76, 48,157,229, 0, 0, 83,227, 0,144,131, 21, 24, 0,154,229, /* 0x 620 */
|
||||
9, 0,128,224, 40,208,141,226,240,143,189,232, 64, 98, 81,115, /* 0x 630 */
|
||||
91, 0,144, 0, 2,240,160,225,240, 71, 45,233, 12,208, 77,226, /* 0x 640 */
|
||||
91, 0,144,239, 2,240,160,225,240, 71, 45,233, 12,208, 77,226, /* 0x 640 */
|
||||
44,192,141,226, 52,112,141,226, 0, 80,160,225, 1, 96,160,225, /* 0x 650 */
|
||||
3,160,160,225, 12, 16,160,225, 0, 48,160,227, 7, 0,160,225, /* 0x 660 */
|
||||
4,144,156,229, 2,128,160,225, 52, 64,157,229,212,254,255,235, /* 0x 670 */
|
||||
|
|
|
@ -338,7 +338,7 @@ do_xmap(int const fdi, Elf32_Ehdr const *const ehdr, struct Extent *const xi,
|
|||
#elif defined(__arm__) /*}{*/
|
||||
if (0==phdr->p_offset) {
|
||||
Elf32_Ehdr *const ehdr = (Elf32_Ehdr *)(void *)addr;
|
||||
*(int *)(void *)&ehdr->e_ident[ 8] = 0x0090005b; // syscall __NR_unmap
|
||||
*(int *)(void *)&ehdr->e_ident[ 8] = 0xef90005b; // syscall __NR_unmap
|
||||
*(int *)(void *)&ehdr->e_ident[12] = 0xe1a0f002; // mov pc,r2
|
||||
}
|
||||
#endif /*}*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user