diff ticoff/disasm.c @ 114:ca8e43288836

tiobjd: ARM_B reloc handling
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 03 Apr 2014 06:42:39 +0000
parents 61a58677dc68
children f9fde7f36ae3
line wrap: on
line diff
--- a/ticoff/disasm.c	Thu Apr 03 06:20:06 2014 +0000
+++ b/ticoff/disasm.c	Thu Apr 03 06:42:39 2014 +0000
@@ -121,8 +121,14 @@
 			   printf("MISALIGNED pos in CODE32 state, aborting\n");
 				return;
 			}
-			/* reloc handling to be added */
-			arm_disasm_line(sec, pos);
+			if (rel) {
+				if (rel->type != RTYPE_ARM_B) {
+			printf("Wrong reloc type in CODE32 state, aborting\n");
+					return;
+				}
+				arm_branch_reloc(sec, rel);
+			} else
+				arm_disasm_line(sec, pos);
 			incr = 4;
 			break;
 		case 1:		/* Thumb */