comparison ticoff/armdis.c @ 115:2f23301d2f86

tiobjd: literal reloc recognition restricted to RTYPE_LONG
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 03 Apr 2014 06:50:07 +0000
parents ca8e43288836
children
comparison
equal deleted inserted replaced
114:ca8e43288836 115:2f23301d2f86
9 #include <strings.h> 9 #include <strings.h>
10 #include "intstruct.h" 10 #include "intstruct.h"
11 #include "globals.h" 11 #include "globals.h"
12 12
13 extern unsigned get_u16(), get_u32(); 13 extern unsigned get_u16(), get_u32();
14 extern struct internal_reloc *find_reloc(); 14 extern struct internal_reloc *find_word32_reloc();
15 15
16 extern char *regnames[16], *condition_decode[16], *shift_types[4]; 16 extern char *regnames[16], *condition_decode[16], *shift_types[4];
17 17
18 static char *dataproc_ops[16] = {"and", "eor", "sub", "rsb", 18 static char *dataproc_ops[16] = {"and", "eor", "sub", "rsb",
19 "add", "adc", "sbc", "rsc", 19 "add", "adc", "sbc", "rsc",
245 litoff = off - loff; 245 litoff = off - loff;
246 } 246 }
247 if (litoff >= sec->size) 247 if (litoff >= sec->size)
248 return(0); 248 return(0);
249 /* all checks passed, proceed */ 249 /* all checks passed, proceed */
250 rel = find_reloc(sec, litoff); 250 rel = find_word32_reloc(sec, litoff);
251 switch (size) { 251 switch (size) {
252 case 1: 252 case 1:
253 datum = filemap[sec->data_offset + litoff]; 253 datum = filemap[sec->data_offset + litoff];
254 break; 254 break;
255 case 2: 255 case 2: