blob: 1a34bc08356ef2ae38c6da0c2f03f466c1f60767 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#define JUMP_DIS_VERBOSE
#include <stdio.h>
#include "jump-dis.c"
#include <stdlib.h>
int main(UNUSED int argc, char **argv) {
static char buf[1048576];
UNUSED size_t size = fread(buf, 1, sizeof(buf), stdin);
printf("size=%zd\n", size);
int patch_size = atoi(argv[1]);
int thumb = atoi(argv[2]);
bool bad = P(main)(buf, 0x10000, 0x10000 + patch_size, thumb);
printf("final: bad = %d\n", bad);
}
|