FreeCalypso > hg > freecalypso-reveng
changeset 123:5f9cc99930a8
tiobjd: handling of $CODE16 symbols at byte positions
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Fri, 04 Apr 2014 08:12:29 +0000 |
parents | ca82528ec84d |
children | 700d77d5cf00 |
files | ticoff/disasm.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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) {