comparison ticoff/reloc.c @ 113:d97fbe98600b

tiobjd: recognizing relocs in ldr literals
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 03 Apr 2014 06:20:06 +0000
parents e650fdc743fe
children 2f23301d2f86
comparison
equal deleted inserted replaced
112:61a58677dc68 113:d97fbe98600b
121 rel->sym->name); 121 rel->sym->name);
122 putchar('\n'); 122 putchar('\n');
123 } 123 }
124 exit(0); 124 exit(0);
125 } 125 }
126
127 struct internal_reloc *
128 find_reloc(sec, loc)
129 struct internal_scnhdr *sec;
130 unsigned loc;
131 {
132 struct internal_reloc *rel;
133 unsigned m;
134
135 rel = sec->int_relocs;
136 for (m = 0; m < sec->nreloc; m++, rel++) {
137 if (rel->location == loc)
138 return(rel);
139 if (rel->location > loc)
140 return(0);
141 }
142 return(0);
143 }