Lines Matching refs:ref

110 	itmc_ref_t	*ref;  in assemble()  local
171 for (ref = ref_first[i], j = 0; ref; ref = ref->next, j++) { in assemble()
174 j, ref, in assemble()
175 ref->name, ref->referencee, in assemble()
176 ref->reloc.itm_ptr, ref->size, in assemble()
177 ref->referencer, ref->next)); in assemble()
201 itmc_ref_t *ref; in relocation_I() local
212 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_STRING]; in relocation_I()
213 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
221 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_DIREC]; in relocation_I()
222 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
230 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_COND]; in relocation_I()
231 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
239 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_MAP]; in relocation_I()
240 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) { in relocation_I()
249 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_OP]; in relocation_I()
250 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) { in relocation_I()
259 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_RANGE]; in relocation_I()
260 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
268 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_ESCAPESEQ]; in relocation_I()
269 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
277 for (sec_num = 0, sec_size = 0, ref = ref_first[ITMC_OBJ_DATA]; in relocation_I()
278 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
279 for (ref = ref_first[ITMC_OBJ_EXPR]; in relocation_I()
280 ref; sec_num += 1, sec_size += ref->size, ref = ref->next) {} in relocation_I()
432 itmc_ref_t *ref; in relocation_II() local
445 for (ref = ref_first[ITMC_OBJ_STRING]; in relocation_II()
446 ref; place += ref->size, ref = ref->next) { in relocation_II()
447 fix_itmc_ref_reloc(ref, place); in relocation_II()
453 for (ref = ref_first[ITMC_OBJ_DIREC]; in relocation_II()
454 ref; place += ref->size, ref = ref->next) { in relocation_II()
455 fix_itmc_ref_reloc(ref, place); in relocation_II()
461 for (ref = ref_first[ITMC_OBJ_COND]; in relocation_II()
462 ref; place += ref->size, ref = ref->next) { in relocation_II()
463 fix_itmc_ref_reloc(ref, place); in relocation_II()
469 for (ref = ref_first[ITMC_OBJ_MAP]; in relocation_II()
470 ref; place += ref->size, ref = ref->next) { in relocation_II()
471 fix_itmc_ref_reloc(ref, place); in relocation_II()
477 for (ref = ref_first[ITMC_OBJ_OP]; in relocation_II()
478 ref; place += ref->size, ref = ref->next) { in relocation_II()
479 fix_itmc_ref_reloc(ref, place); in relocation_II()
484 for (ref = ref_first[ITMC_OBJ_RANGE]; in relocation_II()
485 ref; place += ref->size, ref = ref->next) { in relocation_II()
486 fix_itmc_ref_reloc(ref, place); in relocation_II()
491 for (ref = ref_first[ITMC_OBJ_ESCAPESEQ]; in relocation_II()
492 ref; place += ref->size, ref = ref->next) { in relocation_II()
493 fix_itmc_ref_reloc(ref, place); in relocation_II()
498 for (ref = ref_first[ITMC_OBJ_DATA]; in relocation_II()
499 ref; place += ref->size, ref = ref->next) { in relocation_II()
500 fix_itmc_ref_reloc(ref, place); in relocation_II()
502 for (ref = ref_first[ITMC_OBJ_EXPR]; in relocation_II()
503 ref; place += ref->size, ref = ref->next) { in relocation_II()
504 fix_itmc_ref_reloc(ref, place); in relocation_II()
558 fix_itmc_ref_reloc(rl->ref, in relocation_II()
600 for (ref = ref_first[ITMC_OBJ_OP]; in relocation_II()
601 ref; place += ref->size, ref = ref->next) { in relocation_II()
602 switch (((itm_tbl_hdr_t *)(ref->referencee))->type) { in relocation_II()
604 itm_header->op_init_tbl = ref->reloc; in relocation_II()
607 itm_header->op_reset_tbl = ref->reloc; in relocation_II()
620 fix_itmc_ref_reloc(itmc_ref_t *ref, itm_place2_t place) in fix_itmc_ref_reloc() argument
624 ref->reloc.itm_ptr = place; in fix_itmc_ref_reloc()
626 ref->reloc.itm_pad = 0; in fix_itmc_ref_reloc()
629 if (NULL != ref->referencer) { in fix_itmc_ref_reloc()
630 ref->referencer->itm_ptr = place; in fix_itmc_ref_reloc()
634 ref, ref->referencer, place)); in fix_itmc_ref_reloc()
636 name_to_str(ref->name ? &(ref->name->name) : NULL))); in fix_itmc_ref_reloc()
638 if (NULL != ref->name) { in fix_itmc_ref_reloc()
639 for (rl = ref->name->ref_first; rl; rl = rl->next) { in fix_itmc_ref_reloc()
640 if ((NULL != rl->ref) && in fix_itmc_ref_reloc()
641 (NULL != rl->ref->referencer)) { in fix_itmc_ref_reloc()
642 rl->ref->referencer->itm_ptr = place; in fix_itmc_ref_reloc()
646 rl->ref, rl->ref->referencer)); in fix_itmc_ref_reloc()
649 name_to_str(ref->name ? in fix_itmc_ref_reloc()
650 &(ref->name->name) : in fix_itmc_ref_reloc()
663 itmc_ref_t *ref; in analysis() local
676 for (ref = ref_first[obj_type]; in analysis()
677 ref; place += ref->size, ref = ref->next) { in analysis()
678 if ((NULL == ref->name) && in analysis()
679 (NULL == ref->referencer)) { in analysis()
682 tbl_hdr = (itm_tbl_hdr_t *)(ref->referencee); in analysis()
752 itmc_ref_t *ref; in analysis2() local
757 itmc_ref_t *ref; /* corresponding object's ref */ in analysis2() member
779 for (ref = ref_first[ITMC_OBJ_OP]; ref != NULL; in analysis2()
780 ref = ref->next) { in analysis2()
781 if (o->optbl == ref->referencee) { in analysis2()
782 if (ref->name != NULL) { in analysis2()
783 o->ref = ref->name->object; in analysis2()
785 o->ref = ref; in analysis2()
788 o->optbl, o->ref)); in analysis2()
789 o->ref->vertex_index = i; in analysis2()
803 if (o->ref == NULL) { in analysis2()
806 vertexes[o->ref->vertex_index].ref = o->ref; in analysis2()
807 vertexes[o->ref->vertex_index].e = NULL; in analysis2()
812 if (o->ref == NULL) { in analysis2()
816 o->ref->vertex_index, o->ref, o->ref->referencee, in analysis2()
817 name_to_str(o->ref->name == NULL ? NULL : in analysis2()
818 &(o->ref->name->name)))); in analysis2()
822 i = o->ref->vertex_index; in analysis2()
823 j = in->ref->name->object->vertex_index; in analysis2()
833 (vertexes[i].ref->name == NULL) ? NULL : in analysis2()
834 &(vertexes[i].ref->name->name)), in analysis2()
837 (vertexes[j].ref->name == NULL) ? NULL : in analysis2()
838 &(vertexes[j].ref->name->name)))); in analysis2()
868 (vertexes[k].ref->name == NULL) ? NULL : in analysis2()
869 &(vertexes[k].ref->name->name)), in analysis2()
881 j, name_to_str(&(vertexes[j].ref->name->name)), in analysis2()
900 itmc_ref_t *ref; in output() local
958 for (ref = ref_first[ITMC_OBJ_STRING]; ref; ref = ref->next) { in output()
959 (void) fwrite((void *)(ref->referencee), 1, ref->size, fp); in output()
966 for (ref = ref_first[ITMC_OBJ_DIREC]; ref; ref = ref->next) { in output()
967 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
974 for (ref = ref_first[ITMC_OBJ_COND]; ref; ref = ref->next) { in output()
975 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
982 for (ref = ref_first[ITMC_OBJ_MAP]; ref; ref = ref->next) { in output()
983 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
990 for (ref = ref_first[ITMC_OBJ_OP]; ref; ref = ref->next) { in output()
991 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
998 for (ref = ref_first[ITMC_OBJ_RANGE]; ref; ref = ref->next) { in output()
999 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
1007 for (ref = ref_first[ITMC_OBJ_ESCAPESEQ]; ref; ref = ref->next) { in output()
1008 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
1016 for (ref = ref_first[ITMC_OBJ_DATA]; ref; ref = ref->next) { in output()
1017 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
1018 sec_size += ref->size; in output()
1020 for (ref = ref_first[ITMC_OBJ_EXPR]; ref; ref = ref->next) { in output()
1021 (void) fwrite((void *)(ref->referencee), ref->size, 1, fp); in output()
1022 sec_size += ref->size; in output()
1041 for (ref = ref_first[ITMC_OBJ_DIREC]; ref; ref = ref->next) { in output()
1042 (void) fwrite(&(ref->reloc), in output()
1051 for (ref = ref_first[ITMC_OBJ_COND]; ref; ref = ref->next) { in output()
1052 (void) fwrite(&(ref->reloc), in output()
1061 for (ref = ref_first[ITMC_OBJ_MAP]; ref; ref = ref->next) { in output()
1062 (void) fwrite(&(ref->reloc), in output()
1070 for (ref = ref_first[ITMC_OBJ_OP]; ref; ref = ref->next) { in output()
1071 (void) fwrite(&(ref->reloc), in output()
1080 for (ref = ref_first[ITMC_OBJ_STRING]; ref; ref = ref->next) { in output()
1086 data.place = ref->reloc; in output()
1087 data.size = ref->size; in output()
1095 for (ref = ref_first[ITMC_OBJ_RANGE]; ref; ref = ref->next) { in output()
1096 (void) fwrite(&(ref->reloc), in output()
1103 for (ref = ref_first[ITMC_OBJ_ESCAPESEQ]; in output()
1104 ref; ref = ref->next) { in output()
1105 (void) fwrite(&(ref->reloc), in output()
1113 for (ref = ref_first[ITMC_OBJ_DATA]; ref; ref = ref->next) { in output()
1114 (void) fwrite(&(ref->reloc), in output()
1117 for (ref = ref_first[ITMC_OBJ_EXPR]; ref; ref = ref->next) { in output()
1118 (void) fwrite(&(ref->reloc), in output()