FreeCalypso > hg > freecalypso-reveng
comparison ticoff/disasm.c @ 117:f9fde7f36ae3
tiobjd: Thumb_BL reloc handling
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 03 Apr 2014 07:16:20 +0000 |
parents | ca8e43288836 |
children | 193926ccd1ec |
comparison
equal
deleted
inserted
replaced
116:5f4141ee175b | 117:f9fde7f36ae3 |
---|---|
134 case 1: /* Thumb */ | 134 case 1: /* Thumb */ |
135 if (pos & 1) { | 135 if (pos & 1) { |
136 printf("MISALIGNED pos in CODE16 state, aborting\n"); | 136 printf("MISALIGNED pos in CODE16 state, aborting\n"); |
137 return; | 137 return; |
138 } | 138 } |
139 /* reloc handling to be added */ | 139 if (rel) { |
140 if (headroom >= 4 && thumb_check_bl(sec, pos)) | 140 if (rel->type != RTYPE_THUMB_BL) { |
141 printf("Wrong reloc type in CODE16 state, aborting\n"); | |
142 return; | |
143 } | |
144 thumb_bl_reloc(sec, rel); | |
145 incr = 4; | |
146 } else if (headroom >= 4 && thumb_check_bl(sec, pos)) | |
141 incr = 4; | 147 incr = 4; |
142 else { | 148 else { |
143 thumb_disasm_line(sec, pos); | 149 thumb_disasm_line(sec, pos); |
144 incr = 2; | 150 incr = 2; |
145 } | 151 } |