mirror of
https://github.com/upx/upx.git
synced 2024-11-30 08:00:39 +00:00
Made ps1/exe work again.
committer: mfx <mfx> 1139776798 +0000
This commit is contained in:
parent
29d693de2d
commit
af05296631
@ -84,10 +84,10 @@ PackPs1::PackPs1(InputFile *f) :
|
|||||||
COMPILE_TIME_ASSERT(PS_HDR_SIZE > sizeof(ps1_exe_t));
|
COMPILE_TIME_ASSERT(PS_HDR_SIZE > sizeof(ps1_exe_t));
|
||||||
COMPILE_TIME_ASSERT(SZ_IH_BKUP == 40);
|
COMPILE_TIME_ASSERT(SZ_IH_BKUP == 40);
|
||||||
#if 1 || defined(WITH_NRV)
|
#if 1 || defined(WITH_NRV)
|
||||||
COMPILE_TIME_ASSERT(sizeof(nrv_boot_loader) == 3918);
|
COMPILE_TIME_ASSERT(sizeof(nrv_boot_loader) == 3935);
|
||||||
COMPILE_TIME_ASSERT(NRV_BOOT_LOADER_CRC32 == 0xdf0cbd9e);
|
COMPILE_TIME_ASSERT(NRV_BOOT_LOADER_CRC32 == 0x0ac25782);
|
||||||
COMPILE_TIME_ASSERT(sizeof(nrv_con_loader) == 2810);
|
COMPILE_TIME_ASSERT(sizeof(nrv_con_loader) == 2829);
|
||||||
COMPILE_TIME_ASSERT(NRV_CON_LOADER_CRC32 == 0x31747f8b);
|
COMPILE_TIME_ASSERT(NRV_CON_LOADER_CRC32 == 0x923b55c4);
|
||||||
#endif
|
#endif
|
||||||
fdata_size = file_size - PS_HDR_SIZE;
|
fdata_size = file_size - PS_HDR_SIZE;
|
||||||
}
|
}
|
||||||
|
@ -1058,13 +1058,13 @@ void Packer::initLoader(const void *pdata, int plen, int pinfo, int small)
|
|||||||
|
|
||||||
void __acc_cdecl_va Packer::addLoader(const char *s, ...)
|
void __acc_cdecl_va Packer::addLoader(const char *s, ...)
|
||||||
{
|
{
|
||||||
const char *p;
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, s);
|
va_start(ap, s);
|
||||||
linker->addSection(s);
|
do {
|
||||||
while((p = va_arg(ap, const char *)) != NULL)
|
if (*s)
|
||||||
linker->addSection(p);
|
linker->addSection(s);
|
||||||
|
} while ((s = va_arg(ap, const char *)) != NULL);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,5 +232,7 @@ memset_unaligned:
|
|||||||
; __PS1EOASM__
|
; __PS1EOASM__
|
||||||
eof:
|
eof:
|
||||||
; section .data
|
; section .data
|
||||||
DW -1
|
DW_UNALIGNED -1
|
||||||
DH eof
|
DH_UNALIGNED eof
|
||||||
|
|
||||||
|
; vi:ts=8:et:nowrap
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* l_ps1b.h -- created from l_ps1b.bin, 3918 (0xf4e) bytes
|
/* l_ps1b.h -- created from l_ps1b.bin, 3935 (0xf5f) bytes
|
||||||
|
|
||||||
This file is part of the UPX executable compressor.
|
This file is part of the UPX executable compressor.
|
||||||
|
|
||||||
@ -27,11 +27,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define NRV_BOOT_LOADER_SIZE 3918
|
#define NRV_BOOT_LOADER_SIZE 3935
|
||||||
#define NRV_BOOT_LOADER_ADLER32 0x53c50524
|
#define NRV_BOOT_LOADER_ADLER32 0x07b10524
|
||||||
#define NRV_BOOT_LOADER_CRC32 0xdf0cbd9e
|
#define NRV_BOOT_LOADER_CRC32 0x0ac25782
|
||||||
|
|
||||||
unsigned char nrv_boot_loader[3918] = {
|
unsigned char nrv_boot_loader[3935] = {
|
||||||
83, 80, 8, 60, 82, 86, 8, 53, 35, 64, 8, 2, 8, 0, 0, 1, /* 0x 0 */
|
83, 80, 8, 60, 82, 86, 8, 53, 35, 64, 8, 2, 8, 0, 0, 1, /* 0x 0 */
|
||||||
228,255,189, 39, 0, 0,164,175, 4, 0,165,175, 8, 0,166,175, /* 0x 10 */
|
228,255,189, 39, 0, 0,164,175, 4, 0,165,175, 8, 0,166,175, /* 0x 10 */
|
||||||
12, 0,167,175, 16, 0,162,175, 20, 0,163,175, 24, 0,191,175, /* 0x 20 */
|
12, 0,167,175, 16, 0,162,175, 20, 0,163,175, 24, 0,191,175, /* 0x 20 */
|
||||||
@ -264,17 +264,18 @@ unsigned char nrv_boot_loader[3918] = {
|
|||||||
20, 0,163,143, 80, 69, 80, 74, 24, 0,191,143, 85, 80, 88, 33, /* 0x e50 */
|
20, 0,163,143, 80, 69, 80, 74, 24, 0,191,143, 85, 80, 88, 33, /* 0x e50 */
|
||||||
161,216,208,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x e60 */
|
161,216,208,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x e60 */
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 80, 83, 49, 83, /* 0x e70 */
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 80, 83, 49, 83, /* 0x e70 */
|
||||||
84, 65, 82, 84, 0, 0, 0, 0, 80, 83, 49, 69, 78, 84, 82, 89, /* 0x e80 */
|
84, 65, 82, 84, 0, 0, 0, 0, 0, 80, 83, 49, 69, 78, 84, 82, /* 0x e80 */
|
||||||
20, 0, 0, 0, 80, 83, 49, 67, 79, 78, 72, 76, 56, 0, 0, 0, /* 0x e90 */
|
89, 0, 20, 0, 0, 0, 80, 83, 49, 67, 79, 78, 72, 76, 0, 56, /* 0x e90 */
|
||||||
80, 83, 49, 67, 79, 78, 72, 73, 64, 0, 0, 0, 80, 83, 49, 78, /* 0x ea0 */
|
0, 0, 0, 80, 83, 49, 67, 79, 78, 72, 73, 0, 64, 0, 0, 0, /* 0x ea0 */
|
||||||
50, 66, 48, 56, 68, 0, 0, 0, 80, 83, 49, 78, 50, 68, 48, 56, /* 0x eb0 */
|
80, 83, 49, 78, 50, 66, 48, 56, 0, 68, 0, 0, 0, 80, 83, 49, /* 0x eb0 */
|
||||||
72, 2, 0, 0, 80, 83, 49, 78, 50, 69, 48, 56,136, 4, 0, 0, /* 0x ec0 */
|
78, 50, 68, 48, 56, 0, 72, 2, 0, 0, 80, 83, 49, 78, 50, 69, /* 0x ec0 */
|
||||||
80, 83, 49, 78, 50, 66, 51, 50, 28, 7, 0, 0, 80, 83, 49, 78, /* 0x ed0 */
|
48, 56, 0,136, 4, 0, 0, 80, 83, 49, 78, 50, 66, 51, 50, 0, /* 0x ed0 */
|
||||||
50, 68, 51, 50, 36, 9, 0, 0, 80, 83, 49, 78, 50, 69, 51, 50, /* 0x ee0 */
|
28, 7, 0, 0, 80, 83, 49, 78, 50, 68, 51, 50, 0, 36, 9, 0, /* 0x ee0 */
|
||||||
104, 11, 0, 0, 80, 83, 49, 77, 83, 69, 84, 83, 0, 14, 0, 0, /* 0x ef0 */
|
0, 80, 83, 49, 78, 50, 69, 51, 50, 0,104, 11, 0, 0, 80, 83, /* 0x ef0 */
|
||||||
80, 83, 49, 77, 83, 69, 84, 66, 4, 14, 0, 0, 80, 83, 49, 77, /* 0x f00 */
|
49, 77, 83, 69, 84, 83, 0, 0, 14, 0, 0, 80, 83, 49, 77, 83, /* 0x f00 */
|
||||||
83, 69, 84, 65, 12, 14, 0, 0, 80, 83, 49, 77, 83, 69, 84, 85, /* 0x f10 */
|
69, 84, 66, 0, 4, 14, 0, 0, 80, 83, 49, 77, 83, 69, 84, 65, /* 0x f10 */
|
||||||
28, 14, 0, 0, 80, 83, 49, 69, 88, 73, 84, 67, 48, 14, 0, 0, /* 0x f20 */
|
0, 12, 14, 0, 0, 80, 83, 49, 77, 83, 69, 84, 85, 0, 28, 14, /* 0x f20 */
|
||||||
80, 83, 49, 80, 65, 72, 68, 82, 92, 14, 0, 0, 80, 83, 49, 69, /* 0x f30 */
|
0, 0, 80, 83, 49, 69, 88, 73, 84, 67, 0, 48, 14, 0, 0, 80, /* 0x f30 */
|
||||||
79, 65, 83, 77,124, 14, 0, 0,255,255,255,255,124, 14 /* 0x f40 */
|
83, 49, 80, 65, 72, 68, 82, 0, 92, 14, 0, 0, 80, 83, 49, 69, /* 0x f40 */
|
||||||
|
79, 65, 83, 77, 0,124, 14, 0, 0,255,255,255,255,124, 14 /* 0x f50 */
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* l_ps1c.h -- created from l_ps1c.bin, 2810 (0xafa) bytes
|
/* l_ps1c.h -- created from l_ps1c.bin, 2829 (0xb0d) bytes
|
||||||
|
|
||||||
This file is part of the UPX executable compressor.
|
This file is part of the UPX executable compressor.
|
||||||
|
|
||||||
@ -27,11 +27,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define NRV_CON_LOADER_SIZE 2810
|
#define NRV_CON_LOADER_SIZE 2829
|
||||||
#define NRV_CON_LOADER_ADLER32 0x83b87da3
|
#define NRV_CON_LOADER_ADLER32 0xa3df7da3
|
||||||
#define NRV_CON_LOADER_CRC32 0x31747f8b
|
#define NRV_CON_LOADER_CRC32 0x923b55c4
|
||||||
|
|
||||||
unsigned char nrv_con_loader[2810] = {
|
unsigned char nrv_con_loader[2829] = {
|
||||||
83, 76, 1, 36, 35,232,161, 3, 0, 0,161,175, 4, 0,164,175, /* 0x 0 */
|
83, 76, 1, 36, 35,232,161, 3, 0, 0,161,175, 4, 0,164,175, /* 0x 0 */
|
||||||
8, 0,165,175, 12, 0,166,175, 16, 0,167,175, 20, 0,162,175, /* 0x 10 */
|
8, 0,165,175, 12, 0,166,175, 16, 0,167,175, 20, 0,162,175, /* 0x 10 */
|
||||||
24, 0,163,175, 28, 0,191,175,224,255, 38, 36, 32, 0,167, 39, /* 0x 20 */
|
24, 0,163,175, 28, 0,191,175,224,255, 38, 36, 32, 0,167, 39, /* 0x 20 */
|
||||||
@ -193,19 +193,20 @@ unsigned char nrv_con_loader[2810] = {
|
|||||||
28, 0,191,143, 80, 69, 80, 74, 33,232,161, 3, 85, 80, 88, 33, /* 0x 9e0 */
|
28, 0,191,143, 80, 69, 80, 74, 33,232,161, 3, 85, 80, 88, 33, /* 0x 9e0 */
|
||||||
161,216,208,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 9f0 */
|
161,216,208,213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 9f0 */
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 32, 0, 0, 0, /* 0x a00 */
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 32, 0, 0, 0, /* 0x a00 */
|
||||||
80, 83, 49, 83, 84, 65, 82, 84, 0, 0, 0, 0, 80, 83, 49, 80, /* 0x a10 */
|
80, 83, 49, 83, 84, 65, 82, 84, 0, 0, 0, 0, 0, 80, 83, 49, /* 0x a10 */
|
||||||
65, 68, 67, 68, 84, 0, 0, 0, 80, 83, 49, 67, 79, 78, 72, 76, /* 0x a20 */
|
80, 65, 68, 67, 68, 0, 84, 0, 0, 0, 80, 83, 49, 67, 79, 78, /* 0x a20 */
|
||||||
88, 0, 0, 0, 80, 83, 49, 67, 79, 78, 72, 73,100, 0, 0, 0, /* 0x a30 */
|
72, 76, 0, 88, 0, 0, 0, 80, 83, 49, 67, 79, 78, 72, 73, 0, /* 0x a30 */
|
||||||
80, 83, 49, 69, 78, 84, 82, 89,108, 0, 0, 0, 80, 83, 49, 78, /* 0x a40 */
|
100, 0, 0, 0, 80, 83, 49, 69, 78, 84, 82, 89, 0,108, 0, 0, /* 0x a40 */
|
||||||
50, 66, 48, 56,108, 0, 0, 0, 80, 83, 49, 78, 50, 68, 48, 56, /* 0x a50 */
|
0, 80, 83, 49, 78, 50, 66, 48, 56, 0,108, 0, 0, 0, 80, 83, /* 0x a50 */
|
||||||
208, 1, 0, 0, 80, 83, 49, 78, 50, 69, 48, 56, 84, 3, 0, 0, /* 0x a60 */
|
49, 78, 50, 68, 48, 56, 0,208, 1, 0, 0, 80, 83, 49, 78, 50, /* 0x a60 */
|
||||||
80, 83, 49, 78, 50, 66, 51, 50,244, 4, 0, 0, 80, 83, 49, 78, /* 0x a70 */
|
69, 48, 56, 0, 84, 3, 0, 0, 80, 83, 49, 78, 50, 66, 51, 50, /* 0x a70 */
|
||||||
50, 68, 51, 50, 92, 6, 0, 0, 80, 83, 49, 78, 50, 69, 51, 50, /* 0x a80 */
|
0,244, 4, 0, 0, 80, 83, 49, 78, 50, 68, 51, 50, 0, 92, 6, /* 0x a80 */
|
||||||
228, 7, 0, 0, 80, 83, 49, 77, 83, 69, 84, 83,136, 9, 0, 0, /* 0x a90 */
|
0, 0, 80, 83, 49, 78, 50, 69, 51, 50, 0,228, 7, 0, 0, 80, /* 0x a90 */
|
||||||
80, 83, 49, 77, 83, 69, 84, 66,140, 9, 0, 0, 80, 83, 49, 77, /* 0x aa0 */
|
83, 49, 77, 83, 69, 84, 83, 0,136, 9, 0, 0, 80, 83, 49, 77, /* 0x aa0 */
|
||||||
83, 69, 84, 65,148, 9, 0, 0, 80, 83, 49, 77, 83, 69, 84, 85, /* 0x ab0 */
|
83, 69, 84, 66, 0,140, 9, 0, 0, 80, 83, 49, 77, 83, 69, 84, /* 0x ab0 */
|
||||||
164, 9, 0, 0, 80, 83, 49, 69, 88, 73, 84, 67,184, 9, 0, 0, /* 0x ac0 */
|
65, 0,148, 9, 0, 0, 80, 83, 49, 77, 83, 69, 84, 85, 0,164, /* 0x ac0 */
|
||||||
80, 83, 49, 80, 65, 72, 68, 82,236, 9, 0, 0, 80, 83, 49, 83, /* 0x ad0 */
|
9, 0, 0, 80, 83, 49, 69, 88, 73, 84, 67, 0,184, 9, 0, 0, /* 0x ad0 */
|
||||||
82, 69, 71, 83, 12, 10, 0, 0, 80, 83, 49, 69, 79, 65, 83, 77, /* 0x ae0 */
|
80, 83, 49, 80, 65, 72, 68, 82, 0,236, 9, 0, 0, 80, 83, 49, /* 0x ae0 */
|
||||||
16, 10, 0, 0,255,255,255,255, 16, 10 /* 0x af0 */
|
83, 82, 69, 71, 83, 0, 12, 10, 0, 0, 80, 83, 49, 69, 79, 65, /* 0x af0 */
|
||||||
|
83, 77, 0, 16, 10, 0, 0,255,255,255,255, 16, 10 /* 0x b00 */
|
||||||
};
|
};
|
||||||
|
@ -93,7 +93,7 @@ for $line (@lines)
|
|||||||
if ($line =~ /__([A-Z0-9]{8})__/)
|
if ($line =~ /__([A-Z0-9]{8})__/)
|
||||||
{
|
{
|
||||||
print OU "S$1$ilabel:\n";
|
print OU "S$1$ilabel:\n";
|
||||||
push @{ $test[++$#test] }, "\t\tDB\t\"$1\"\n\t\tDW\tS$1$ilabel\n";
|
push @{ $test[++$#test] }, "\t\tDB\t\t\"$1\",0\n\t\tDW_UNALIGNED\tS$1$ilabel\n";
|
||||||
|
|
||||||
$cs = $1;
|
$cs = $1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user