From b4f57dee3b2c61a8eacd9db7062b44fa01d78c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Moln=C3=A1r?= Date: Tue, 22 Aug 2006 14:16:46 +0200 Subject: [PATCH] arm.v4t-wince.pe: minor cleanups --- src/stub/arm.v4t-wince.pe.h | 78 ++++++++++++++++----------------- src/stub/src/arm.v4t-wince.pe.S | 20 +++++---- 2 files changed, 51 insertions(+), 47 deletions(-) diff --git a/src/stub/arm.v4t-wince.pe.h b/src/stub/arm.v4t-wince.pe.h index 946edced..610f1573 100644 --- a/src/stub/arm.v4t-wince.pe.h +++ b/src/stub/arm.v4t-wince.pe.h @@ -28,8 +28,8 @@ #define NRV_LOADER_THUMB_SIZE 9895 -#define NRV_LOADER_THUMB_ADLER32 0xac6cc7f2 -#define NRV_LOADER_THUMB_CRC32 0x6ff13319 +#define NRV_LOADER_THUMB_ADLER32 0xb2a6c7a0 +#define NRV_LOADER_THUMB_CRC32 0xdc191e6c unsigned char nrv_loader_thumb[9895] = { 127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */ @@ -299,14 +299,14 @@ unsigned char nrv_loader_thumb[9895] = { 3, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1080 */ 3, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1090 */ 3, 0, 22, 0, 49, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, /* 0x10a0 */ - 16, 0, 3, 0, 54, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, /* 0x10b0 */ - 16, 0, 3, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10c0 */ - 16, 0, 0, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10d0 */ - 16, 0, 0, 0, 97, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, /* 0x10e0 */ - 16, 0, 3, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10f0 */ - 16, 0, 0, 0,124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1100 */ - 16, 0, 0, 0,144, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, /* 0x1110 */ - 16, 0, 3, 0,149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1120 */ + 16, 0, 3, 0, 54, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, /* 0x10b0 */ + 16, 0, 3, 0, 59, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, /* 0x10c0 */ + 16, 0, 3, 0, 64, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, /* 0x10d0 */ + 16, 0, 3, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10e0 */ + 16, 0, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10f0 */ + 16, 0, 0, 0,107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1100 */ + 16, 0, 0, 0,129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1110 */ + 16, 0, 0, 0,149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1120 */ 16, 0, 0, 0,164, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, /* 0x1130 */ 31, 0, 5, 0,169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x1140 */ 16, 0, 0, 0,189, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, /* 0x1150 */ @@ -324,13 +324,13 @@ unsigned char nrv_loader_thumb[9895] = { 16, 0, 0, 0, 0, 46,114,101, 97,108, 95,115,116, 97,114,116, /* 0x1210 */ 95,111,102, 73,109,112,111,114,116,115, 0, 46,114,101, 97,108, /* 0x1220 */ 95,115,116, 97,114,116, 95,111,102, 76, 90, 77, 65, 95, 68, 69, /* 0x1230 */ - 67, 79, 68, 69, 0, 83, 82, 67, 48, 0, 69, 78, 84, 82, 0,115, /* 0x1240 */ -116, 97,114,116, 95,111,102, 95, 99,111,109,112,114,101,115,115, /* 0x1250 */ -101,100, 0, 99,111,109,112,114,101,115,115,101,100, 95,108,101, /* 0x1260 */ -110,103,116,104, 0, 68, 83, 84, 48, 0,115,116, 97,114,116, 95, /* 0x1270 */ -111,102, 95,117,110, 99,111,109,112,114,101,115,115,101,100, 0, /* 0x1280 */ -117,110, 99,111,109,112,114,101,115,115,101,100, 95,108,101,110, /* 0x1290 */ -103,116,104, 0, 73, 65, 84, 84, 0,111,114,105,103,105,110, 97, /* 0x12a0 */ + 67, 79, 68, 69, 0, 83, 82, 67, 48, 0, 68, 83, 84, 48, 0, 73, /* 0x1240 */ + 65, 84, 84, 0, 69, 78, 84, 82, 0,115,116, 97,114,116, 95,111, /* 0x1250 */ +102, 95, 99,111,109,112,114,101,115,115,101,100, 0, 99,111,109, /* 0x1260 */ +112,114,101,115,115,101,100, 95,108,101,110,103,116,104, 0,115, /* 0x1270 */ +116, 97,114,116, 95,111,102, 95,117,110, 99,111,109,112,114,101, /* 0x1280 */ +115,115,101,100, 0,117,110, 99,111,109,112,114,101,115,115,101, /* 0x1290 */ +100, 95,108,101,110,103,116,104, 0,111,114,105,103,105,110, 97, /* 0x12a0 */ 108, 95,101,110,116,114,121, 0, 70, 73, 66, 83, 0,102,105,108, /* 0x12b0 */ 116,101,114, 95, 98,117,102,102,101,114, 95,115,116, 97,114,116, /* 0x12c0 */ 0, 70, 73, 66, 69, 0,102,105,108,116,101,114, 95, 98,117,102, /* 0x12d0 */ @@ -341,8 +341,8 @@ unsigned char nrv_loader_thumb[9895] = { 95,100,108,108, 95,110, 97,109,101,115, 0, 85, 80, 88, 98, 0, /* 0x1320 */ 85, 80, 88, 97, 0, 85, 80, 88, 99, 0, 85, 80, 88,100, 0, 0, /* 0x1330 */ 4, 0, 0, 0, 1, 1, 0, 0, 28, 0, 0, 0, 1, 1, 0, 0, /* 0x1340 */ - 56, 0, 0, 0, 2, 19, 0, 0, 60, 0, 0, 0, 2, 20, 0, 0, /* 0x1350 */ - 64, 0, 0, 0, 2, 22, 0, 0, 68, 0, 0, 0, 2, 23, 0, 0, /* 0x1360 */ + 56, 0, 0, 0, 2, 21, 0, 0, 60, 0, 0, 0, 2, 22, 0, 0, /* 0x1350 */ + 64, 0, 0, 0, 2, 23, 0, 0, 68, 0, 0, 0, 2, 24, 0, 0, /* 0x1360 */ 88, 0, 0, 0, 2, 25, 0, 0, 48, 0, 0, 0, 2, 27, 0, 0, /* 0x1370 */ 52, 0, 0, 0, 2, 29, 0, 0, 60, 0, 0, 0, 2, 31, 0, 0, /* 0x1380 */ 14, 0, 0, 0, 10, 2, 0, 0, 40, 0, 0, 0, 10, 2, 0, 0, /* 0x1390 */ @@ -491,27 +491,27 @@ unsigned char nrv_loader_thumb[9895] = { 48, 48, 32, 76, 90, 77, 65, 95, 68, 69, 67, 49, 48, 10, 48, 48, /* 0x1c80 */ 48, 48, 48, 48, 51, 56, 32,103, 32, 32, 32, 32, 32, 32, 32, 69, /* 0x1c90 */ 120,101, 83,116, 97,114,116, 9, 48, 48, 48, 48, 48, 48, 48, 48, /* 0x1ca0 */ - 32, 83, 82, 67, 48, 10, 48, 48, 48, 48, 48, 48, 53, 56, 32,103, /* 0x1cb0 */ + 32, 83, 82, 67, 48, 10, 48, 48, 48, 48, 48, 48, 52, 48, 32,103, /* 0x1cb0 */ 32, 32, 32, 32, 32, 32, 32, 69,120,101, 83,116, 97,114,116, 9, /* 0x1cc0 */ - 48, 48, 48, 48, 48, 48, 48, 48, 32, 69, 78, 84, 82, 10, 48, 48, /* 0x1cd0 */ - 48, 48, 48, 48, 48, 48, 32, 32, 32, 32, 32, 32, 32, 32, 32, 42, /* 0x1ce0 */ - 85, 78, 68, 42, 9, 48, 48, 48, 48, 48, 48, 48, 48, 32,115,116, /* 0x1cf0 */ - 97,114,116, 95,111,102, 95, 99,111,109,112,114,101,115,115,101, /* 0x1d00 */ -100, 10, 48, 48, 48, 48, 48, 48, 48, 48, 32, 32, 32, 32, 32, 32, /* 0x1d10 */ - 32, 32, 32, 42, 85, 78, 68, 42, 9, 48, 48, 48, 48, 48, 48, 48, /* 0x1d20 */ - 48, 32, 99,111,109,112,114,101,115,115,101,100, 95,108,101,110, /* 0x1d30 */ -103,116,104, 10, 48, 48, 48, 48, 48, 48, 52, 48, 32,103, 32, 32, /* 0x1d40 */ - 32, 32, 32, 32, 32, 69,120,101, 83,116, 97,114,116, 9, 48, 48, /* 0x1d50 */ - 48, 48, 48, 48, 48, 48, 32, 68, 83, 84, 48, 10, 48, 48, 48, 48, /* 0x1d60 */ - 48, 48, 48, 48, 32, 32, 32, 32, 32, 32, 32, 32, 32, 42, 85, 78, /* 0x1d70 */ - 68, 42, 9, 48, 48, 48, 48, 48, 48, 48, 48, 32,115,116, 97,114, /* 0x1d80 */ -116, 95,111,102, 95,117,110, 99,111,109,112,114,101,115,115,101, /* 0x1d90 */ -100, 10, 48, 48, 48, 48, 48, 48, 48, 48, 32, 32, 32, 32, 32, 32, /* 0x1da0 */ - 32, 32, 32, 42, 85, 78, 68, 42, 9, 48, 48, 48, 48, 48, 48, 48, /* 0x1db0 */ - 48, 32,117,110, 99,111,109,112,114,101,115,115,101,100, 95,108, /* 0x1dc0 */ -101,110,103,116,104, 10, 48, 48, 48, 48, 48, 48, 52, 56, 32,103, /* 0x1dd0 */ - 32, 32, 32, 32, 32, 32, 32, 69,120,101, 83,116, 97,114,116, 9, /* 0x1de0 */ - 48, 48, 48, 48, 48, 48, 48, 48, 32, 73, 65, 84, 84, 10, 48, 48, /* 0x1df0 */ + 48, 48, 48, 48, 48, 48, 48, 48, 32, 68, 83, 84, 48, 10, 48, 48, /* 0x1cd0 */ + 48, 48, 48, 48, 52, 56, 32,103, 32, 32, 32, 32, 32, 32, 32, 69, /* 0x1ce0 */ +120,101, 83,116, 97,114,116, 9, 48, 48, 48, 48, 48, 48, 48, 48, /* 0x1cf0 */ + 32, 73, 65, 84, 84, 10, 48, 48, 48, 48, 48, 48, 53, 56, 32,103, /* 0x1d00 */ + 32, 32, 32, 32, 32, 32, 32, 69,120,101, 83,116, 97,114,116, 9, /* 0x1d10 */ + 48, 48, 48, 48, 48, 48, 48, 48, 32, 69, 78, 84, 82, 10, 48, 48, /* 0x1d20 */ + 48, 48, 48, 48, 48, 48, 32, 32, 32, 32, 32, 32, 32, 32, 32, 42, /* 0x1d30 */ + 85, 78, 68, 42, 9, 48, 48, 48, 48, 48, 48, 48, 48, 32,115,116, /* 0x1d40 */ + 97,114,116, 95,111,102, 95, 99,111,109,112,114,101,115,115,101, /* 0x1d50 */ +100, 10, 48, 48, 48, 48, 48, 48, 48, 48, 32, 32, 32, 32, 32, 32, /* 0x1d60 */ + 32, 32, 32, 42, 85, 78, 68, 42, 9, 48, 48, 48, 48, 48, 48, 48, /* 0x1d70 */ + 48, 32, 99,111,109,112,114,101,115,115,101,100, 95,108,101,110, /* 0x1d80 */ +103,116,104, 10, 48, 48, 48, 48, 48, 48, 48, 48, 32, 32, 32, 32, /* 0x1d90 */ + 32, 32, 32, 32, 32, 42, 85, 78, 68, 42, 9, 48, 48, 48, 48, 48, /* 0x1da0 */ + 48, 48, 48, 32,115,116, 97,114,116, 95,111,102, 95,117,110, 99, /* 0x1db0 */ +111,109,112,114,101,115,115,101,100, 10, 48, 48, 48, 48, 48, 48, /* 0x1dc0 */ + 48, 48, 32, 32, 32, 32, 32, 32, 32, 32, 32, 42, 85, 78, 68, 42, /* 0x1dd0 */ + 9, 48, 48, 48, 48, 48, 48, 48, 48, 32,117,110, 99,111,109,112, /* 0x1de0 */ +114,101,115,115,101,100, 95,108,101,110,103,116,104, 10, 48, 48, /* 0x1df0 */ 48, 48, 48, 48, 48, 48, 32, 32, 32, 32, 32, 32, 32, 32, 32, 42, /* 0x1e00 */ 85, 78, 68, 42, 9, 48, 48, 48, 48, 48, 48, 48, 48, 32,111,114, /* 0x1e10 */ 105,103,105,110, 97,108, 95,101,110,116,114,121, 10, 48, 48, 48, /* 0x1e20 */ diff --git a/src/stub/src/arm.v4t-wince.pe.S b/src/stub/src/arm.v4t-wince.pe.S index 979626e2..89dd447b 100644 --- a/src/stub/src/arm.v4t-wince.pe.S +++ b/src/stub/src/arm.v4t-wince.pe.S @@ -30,11 +30,15 @@ */ // p_armpe.cpp uses some symbols, so they should be global -// in thumb mode we need this S() macro hack to export a symbol which -// is used in an ldr statement -#define S(sym) .globl sym; sym: .L##sym -#define DEBUG 0 + .globl SRC0 + .globl DST0 + .globl IATT + .globl ENTR + +// in thumb mode we need this S() macro hack to export a symbol which +// is used in a ldr statement +#define S(sym) .globl sym; sym: .L##sym #define section .section @@ -70,12 +74,12 @@ section ExeStart ldr ip, ENTR bx ip -S(SRC0):.long start_of_compressed +SRC0: .long start_of_compressed SRCL: .long compressed_length -S(DST0):.long start_of_uncompressed +DST0: .long start_of_uncompressed DSTL: .long uncompressed_length -S(IATT):.long 0, 0, 0, 0 -S(ENTR):.long original_entry +IATT: .long 0, 0, 0, 0 +ENTR: .long original_entry .thumb