This commit is contained in:
Markus F.X.J. Oberhumer
2006-06-14 11:48:44 +02:00
7 changed files with 401 additions and 92 deletions
+3 -3
View File
@@ -28,8 +28,8 @@
#define LINUX_ELF32ARM_FOLD_SIZE 2080
#define LINUX_ELF32ARM_FOLD_ADLER32 0xbb4d53cf
#define LINUX_ELF32ARM_FOLD_CRC32 0x44605956
#define LINUX_ELF32ARM_FOLD_ADLER32 0x885d5313
#define LINUX_ELF32ARM_FOLD_CRC32 0x744eec3f
unsigned char linux_elf32arm_fold[2080] = {
127, 69, 76, 70, 1, 1, 1, 97, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
@@ -114,7 +114,7 @@ unsigned char linux_elf32arm_fold[2080] = {
12,192,100,224, 8, 32,130,225, 5, 0,160,225, 10, 16,160,225, /* 0x 4f0 */
0,224,141,229, 4,192,141,229, 25,255,255,235, 0, 0, 85,225, /* 0x 500 */
62, 0, 0, 26, 0, 0, 91,227, 6, 0, 0, 10, 16, 32,157,229, /* 0x 510 */
40, 49,176,225, 2, 48,160, 17, 28, 16,141,226, 11, 0,160,225, /* 0x 520 */
4, 48, 24,226, 2, 48,160, 17, 28, 16,141,226, 11, 0,160,225, /* 0x 520 */
24, 32,157,229, 45,255,255,235, 0, 48,106,226, 3, 74,160,225, /* 0x 530 */
2, 0, 24,227, 36, 74,160,225, 7, 0, 0, 10, 0, 0, 84,227, /* 0x 540 */
10, 16,133,224, 4, 32,160,225, 3, 0, 0, 10, 0, 48,160,227, /* 0x 550 */
+9 -5
View File
@@ -102,20 +102,24 @@ dprintf(char const *fmt, ...)
char buf[20];
va_list va; va_start(va, fmt);
ptr= &buf[0];
while (0!=(c= *fmt++)) if ('%'!=c) n+= write(2, fmt-1, 1);
while (0!=(c= *fmt++)) if ('%'!=c) goto literal;
else switch (c= *fmt++) {
default: {
literal:
n+= write(2, fmt-1, 1);
} break;
case 0: goto done; /* early */
case 'u': {
n+= write(2, buf, unsimal(va_arg(va, unsigned), buf, 0));
} break;
case 'd': {
n+= write(2, buf, decimal(va_arg(va, int), buf, 0));
} break;
case 'p': {
n+= write(2, STR_0x(), 2);
} /* fall through into 'x' */
case 'p': /* same as 'x'; relies on sizeof(int)==sizeof(void *) */
case 'x': {
n+= write(2, buf, heximal(va_arg(va, int), buf, 0));
buf[0] = '0';
buf[1] = 'x';
n+= write(2, buf, heximal(va_arg(va, int), buf, 2));
} break;
}
done: