Lines Matching refs:ref

108 	itmc_ref_t	*ref;  in assemble()  local
169 for (ref = ref_first[i], j = 0; ref; ref = ref->next, j++) { in assemble()
172 j, ref, in assemble()
173 ref->name, ref->referencee, in assemble()
174 ref->reloc.itm_ptr, ref->size, in assemble()
175 ref->referencer, ref->next)); in assemble()
199 itmc_ref_t *ref; in relocation_I() local
210 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_STRING]; in relocation_I()
211 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
219 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_DIREC]; in relocation_I()
220 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
228 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_COND]; in relocation_I()
229 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
237 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_MAP]; in relocation_I()
238 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) { in relocation_I()
247 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_OP]; in relocation_I()
248 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) { in relocation_I()
257 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_RANGE]; in relocation_I()
258 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
266 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_ESCAPESEQ]; in relocation_I()
267 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
275 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_DATA]; in relocation_I()
276 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
277 for (ref = ref_first[ITMC_OBJ_EXPR]; in relocation_I()
278 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
430 itmc_ref_t *ref; in relocation_II() local
443 for (ref = ref_first[ITMC_OBJ_STRING]; in relocation_II()
444 ref; place += ref->size, ref = ref->next) { in relocation_II()
445 fix_itmc_ref_reloc(ref, place); in relocation_II()
451 for (ref = ref_first[ITMC_OBJ_DIREC]; in relocation_II()
452 ref; place += ref->size, ref = ref->next) { in relocation_II()
453 fix_itmc_ref_reloc(ref, place); in relocation_II()
459 for (ref = ref_first[ITMC_OBJ_COND]; in relocation_II()
460 ref; place += ref->size, ref = ref->next) { in relocation_II()
461 fix_itmc_ref_reloc(ref, place); in relocation_II()
467 for (ref = ref_first[ITMC_OBJ_MAP]; in relocation_II()
468 ref; place += ref->size, ref = ref->next) { in relocation_II()
469 fix_itmc_ref_reloc(ref, place); in relocation_II()
475 for (ref = ref_first[ITMC_OBJ_OP]; in relocation_II()
476 ref; place += ref->size, ref = ref->next) { in relocation_II()
477 fix_itmc_ref_reloc(ref, place); in relocation_II()
482 for (ref = ref_first[ITMC_OBJ_RANGE]; in relocation_II()
483 ref; place += ref->size, ref = ref->next) { in relocation_II()
484 fix_itmc_ref_reloc(ref, place); in relocation_II()
489 for (ref = ref_first[ITMC_OBJ_ESCAPESEQ]; in relocation_II()
490 ref; place += ref->size, ref = ref->next) { in relocation_II()
491 fix_itmc_ref_reloc(ref, place); in relocation_II()
496 for (ref = ref_first[ITMC_OBJ_DATA]; in relocation_II()
497 ref; place += ref->size, ref = ref->next) { in relocation_II()
498 fix_itmc_ref_reloc(ref, place); in relocation_II()
500 for (ref = ref_first[ITMC_OBJ_EXPR]; in relocation_II()
501 ref; place += ref->size, ref = ref->next) { in relocation_II()
502 fix_itmc_ref_reloc(ref, place); in relocation_II()
556 fix_itmc_ref_reloc(rl->ref, in relocation_II()
598 for (ref = ref_first[ITMC_OBJ_OP]; in relocation_II()
599 ref; place += ref->size, ref = ref->next) { in relocation_II()
600 switch (((itm_tbl_hdr_t *)(ref->referencee))->type) { in relocation_II()
602 itm_header->op_init_tbl = ref->reloc; in relocation_II()
605 itm_header->op_reset_tbl = ref->reloc; in relocation_II()
618 fix_itmc_ref_reloc(itmc_ref_t *ref, itm_place2_t place) in fix_itmc_ref_reloc() argument
622 ref->reloc.itm_ptr = place; in fix_itmc_ref_reloc()
624 ref->reloc.itm_pad = 0; in fix_itmc_ref_reloc()
627 if (NULL != ref->referencer) { in fix_itmc_ref_reloc()
628 ref->referencer->itm_ptr = place; in fix_itmc_ref_reloc()
632 ref, ref->referencer, place)); in fix_itmc_ref_reloc()
634 name_to_str(ref->name ? &(ref->name->name) : NULL))); in fix_itmc_ref_reloc()
636 if (NULL != ref->name) { in fix_itmc_ref_reloc()
637 for (rl = ref->name->ref_first; rl; rl = rl->next) { in fix_itmc_ref_reloc()
638 if ((NULL != rl->ref) && in fix_itmc_ref_reloc()
639 (NULL != rl->ref->referencer)) { in fix_itmc_ref_reloc()
640 rl->ref->referencer->itm_ptr = place; in fix_itmc_ref_reloc()
644 rl->ref, rl->ref->referencer)); in fix_itmc_ref_reloc()
647 name_to_str(ref->name ? in fix_itmc_ref_reloc()
648 &(ref->name->name) : in fix_itmc_ref_reloc()
661 itmc_ref_t *ref; in analysis() local
674 for (ref = ref_first[obj_type]; in analysis()
675 ref; place += ref->size, ref = ref->next) { in analysis()
676 if ((NULL == ref->name) && in analysis()
677 (NULL == ref->referencer)) { in analysis()
680 tbl_hdr = (itm_tbl_hdr_t *)(ref->referencee); in analysis()
750 itmc_ref_t *ref; in analysis2() local
755 itmc_ref_t *ref; /* corresponding object's ref */ in analysis2() member
777 for (ref = ref_first[ITMC_OBJ_OP]; ref != NULL; in analysis2()
778 ref = ref->next) { in analysis2()
779 if (o->optbl == ref->referencee) { in analysis2()
780 if (ref->name != NULL) { in analysis2()
781 o->ref = ref->name->object; in analysis2()
783 o->ref = ref; in analysis2()
786 o->optbl, o->ref)); in analysis2()
787 o->ref->vertex_index = i; in analysis2()
801 if (o->ref == NULL) { in analysis2()
804 vertexes[o->ref->vertex_index].ref = o->ref; in analysis2()
805 vertexes[o->ref->vertex_index].e = NULL; in analysis2()
810 if (o->ref == NULL) { in analysis2()
814 o->ref->vertex_index, o->ref, o->ref->referencee, in analysis2()
815 name_to_str(o->ref->name == NULL ? NULL : in analysis2()
816 &(o->ref->name->name)))); in analysis2()
820 i = o->ref->vertex_index; in analysis2()
821 j = in->ref->name->object->vertex_index; in analysis2()
831 (vertexes[i].ref->name == NULL) ? NULL : in analysis2()
832 &(vertexes[i].ref->name->name)), in analysis2()
835 (vertexes[j].ref->name == NULL) ? NULL : in analysis2()
836 &(vertexes[j].ref->name->name)))); in analysis2()
866 (vertexes[k].ref->name == NULL) ? NULL : in analysis2()
867 &(vertexes[k].ref->name->name)), in analysis2()
879 j, name_to_str(&(vertexes[j].ref->name->name)), in analysis2()
898 itmc_ref_t *ref; in output() local
956 for (ref = ref_first[ITMC_OBJ_STRING]; ref; ref = ref->next) { in output()
957 (void) fwrite((void *)(ref->referencee), 1, ref->size, fp); in output()
964 for (ref = ref_first[ITMC_OBJ_DIREC]; ref; ref = ref->next) { in output()
965 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
972 for (ref = ref_first[ITMC_OBJ_COND]; ref; ref = ref->next) { in output()
973 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
980 for (ref = ref_first[ITMC_OBJ_MAP]; ref; ref = ref->next) { in output()
981 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
988 for (ref = ref_first[ITMC_OBJ_OP]; ref; ref = ref->next) { in output()
989 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
996 for (ref = ref_first[ITMC_OBJ_RANGE]; ref; ref = ref->next) { in output()
997 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
1005 for (ref = ref_first[ITMC_OBJ_ESCAPESEQ]; ref; ref = ref->next) { in output()
1006 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
1014 for (ref = ref_first[ITMC_OBJ_DATA]; ref; ref = ref->next) { in output()
1015 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
1016 sec_size += ref->size; in output()
1018 for (ref = ref_first[ITMC_OBJ_EXPR]; ref; ref = ref->next) { in output()
1019 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
1020 sec_size += ref->size; in output()
1039 for (ref = ref_first[ITMC_OBJ_DIREC]; ref; ref = ref->next) { in output()
1040 (void) fwrite(&(ref->reloc), in output()
1049 for (ref = ref_first[ITMC_OBJ_COND]; ref; ref = ref->next) { in output()
1050 (void) fwrite(&(ref->reloc), in output()
1059 for (ref = ref_first[ITMC_OBJ_MAP]; ref; ref = ref->next) { in output()
1060 (void) fwrite(&(ref->reloc), in output()
1068 for (ref = ref_first[ITMC_OBJ_OP]; ref; ref = ref->next) { in output()
1069 (void) fwrite(&(ref->reloc), in output()
1078 for (ref = ref_first[ITMC_OBJ_STRING]; ref; ref = ref->next) { in output()
1084 data.place = ref->reloc; in output()
1085 data.size = ref->size; in output()
1093 for (ref = ref_first[ITMC_OBJ_RANGE]; ref; ref = ref->next) { in output()
1094 (void) fwrite(&(ref->reloc), in output()
1101 for (ref = ref_first[ITMC_OBJ_ESCAPESEQ]; in output()
1102 ref; ref = ref->next) { in output()
1103 (void) fwrite(&(ref->reloc), in output()
1111 for (ref = ref_first[ITMC_OBJ_DATA]; ref; ref = ref->next) { in output()
1112 (void) fwrite(&(ref->reloc), in output()
1115 for (ref = ref_first[ITMC_OBJ_EXPR]; ref; ref = ref->next) { in output()
1116 (void) fwrite(&(ref->reloc), in output()