# HG changeset patch # User Michael Spacefalcon # Date 1396599149 0 # Node ID 5f9cc99930a8c4670faffb86f9650d5de1634cc0 # Parent ca82528ec84d61fa7265f4f5f5912353756ba3f5 tiobjd: handling of $CODE16 symbols at byte positions diff -r ca82528ec84d -r 5f9cc99930a8 ticoff/disasm.c --- a/ticoff/disasm.c Fri Apr 04 07:46:08 2014 +0000 +++ b/ticoff/disasm.c Fri Apr 04 08:12:29 2014 +0000 @@ -146,6 +146,15 @@ incr = 4; goto next; } + if (pos & 1 || headroom < 2) { + if (rel) { + printf("error: reloc at byte pos, aborting\n"); + return; + } + printf("%02x\n", filemap[sec->data_offset + pos]); + incr = 1; + goto next; + } switch (state) { case 0: /* ARM */ if (pos & 3) {