diff options
author | comex | 2015-01-21 17:02:52 -0500 |
---|---|---|
committer | comex | 2015-01-21 17:03:21 -0500 |
commit | 9fbf8080fb308d9c6dad8c534ad8892c2d715087 (patch) | |
tree | 3415053faf262f7ad2766d18c0885d81ba7cbad2 /test/test-transform-dis.c | |
parent | forgot to actually check this in (diff) | |
download | substitute-9fbf8080fb308d9c6dad8c534ad8892c2d715087.tar.gz |
minor cleanup - stop caring about thumb outside of arch-specific code
(and fix makefile bug where files whose names contained 'arm' would
always be ldid'd)
Diffstat (limited to '')
-rw-r--r-- | test/test-transform-dis.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test-transform-dis.c b/test/test-transform-dis.c index d7c44d6..a0a60d5 100644 --- a/test/test-transform-dis.c +++ b/test/test-transform-dis.c @@ -6,7 +6,12 @@ int main(UNUSED int argc, char **argv) { static uint8_t in[1048576]; UNUSED size_t size = fread(in, 1, sizeof(in), stdin); int patch_size = atoi(argv[1]); + struct arch_dis_ctx arch; + memset(&arch, 0, sizeof(arch)); +#ifdef __arm__ int thumb = atoi(argv[2]); + arch.pc_low_bit = thumb; +#endif uint8_t out[patch_size * 10]; int offsets[patch_size + 1]; void *rewritten_ptr = out; @@ -16,7 +21,7 @@ int main(UNUSED int argc, char **argv) { &rewritten_ptr, 0x10000, 0x10000 + patch_size, - thumb, + arch, offsets); printf("=> %d\n", ret); printf("#endif\n"); |