Lines Matching full:fixp
153 fixS *fixP;
157 fixP = (fixS *) obstack_alloc (¬es, sizeof (fixS));
159 fixP->fx_frag = frag;
160 fixP->fx_where = where;
161 fixP->fx_size = size;
163 if (fixP->fx_size != size)
168 fixP->fx_addsy = add_symbol;
169 fixP->fx_subsy = sub_symbol;
170 fixP->fx_offset = offset;
171 fixP->fx_dot_value = dot_value;
172 fixP->fx_dot_frag = dot_frag;
173 fixP->fx_pcrel = pcrel;
174 fixP->fx_r_type = r_type;
175 fixP->fx_im_disp = 0;
176 fixP->fx_pcrel_adjust = 0;
177 fixP->fx_bit_fixP = 0;
178 fixP->fx_addnumber = 0;
179 fixP->fx_tcbit = 0;
180 fixP->fx_tcbit2 = 0;
181 fixP->fx_done = 0;
182 fixP->fx_no_overflow = 0;
183 fixP->fx_signed = 0;
186 fixP->fx_cgen.insn = NULL;
187 fixP->fx_cgen.opinfo = 0;
191 TC_INIT_FIX_DATA (fixP);
194 fixP->fx_file = as_where (&fixP->fx_line);
207 fixP->fx_next = *seg_fix_rootP;
208 *seg_fix_rootP = fixP;
209 if (fixP->fx_next == NULL)
210 *seg_fix_tailP = fixP;
214 fixP->fx_next = NULL;
216 (*seg_fix_tailP)->fx_next = fixP;
218 *seg_fix_rootP = fixP;
219 *seg_fix_tailP = fixP;
223 return fixP;
623 fixS *fixp = seginfo->fix_root;
625 if (!fixp)
629 while (fixp)
631 symbolS *s = fixp->fx_addsy;
633 fprintf (stream, " %08lx: type %d ", (unsigned long) fixp,
634 (int) fixp->fx_r_type);
642 fixp = fixp->fx_next;
769 fixS *fixp;
776 for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next)
777 if (fixp->fx_done)
780 else if (fixp->fx_addsy)
787 print_fixup (fixp);
790 sym = fixp->fx_addsy;
798 if (fixp->fx_subsy != NULL)
799 resolve_symbol_value (fixp->fx_subsy);
809 fixp->fx_offset += symbol_get_value_expression (sym)->X_add_number;
810 fixp->fx_addsy = newsym;
816 fixp->fx_offset += S_GET_VALUE (sym);
817 fixp->fx_addsy = symbol_get_value_expression (sym)->X_add_symbol;
823 if (S_FORCE_RELOC (fixp->fx_addsy, 1))
830 if (! tc_fix_adjustable (fixp))
870 && (fixp->fx_offset != 0 || fixp->fx_subsy != NULL))
880 fixp->fx_offset += S_GET_VALUE (sym);
881 fixp->fx_addsy = section_symbol (S_GET_SEGMENT (sym));
884 print_fixup (fixp);
901 fixup_segment (fixS *fixP, segT this_segment)
907 if (fixP != NULL && abs_section_sym == NULL)
918 for (; fixP; fixP = fixP->fx_next)
919 if (!fixP->fx_done)
921 if (fixP->fx_addsy == NULL)
927 fixP->fx_addsy = abs_section_sym;
929 symbol_mark_used_in_reloc (fixP->fx_addsy);
930 if (fixP->fx_subsy != NULL)
931 symbol_mark_used_in_reloc (fixP->fx_subsy);
936 for (; fixP; fixP = fixP->fx_next)
940 print_fixup (fixP);
943 fragP = fixP->fx_frag;
946 TC_VALIDATE_FIX (fixP, this_segment, skip);
948 add_number = fixP->fx_offset;
950 if (fixP->fx_addsy != NULL)
951 add_symbol_segment = S_GET_SEGMENT (fixP->fx_addsy);
953 if (fixP->fx_subsy != NULL)
956 resolve_symbol_value (fixP->fx_subsy);
957 sub_symbol_segment = S_GET_SEGMENT (fixP->fx_subsy);
958 if (fixP->fx_addsy != NULL
960 && !S_FORCE_RELOC (fixP->fx_addsy, 0)
961 && !S_FORCE_RELOC (fixP->fx_subsy, 0)
962 && !TC_FORCE_RELOCATION_SUB_SAME (fixP, add_symbol_segment))
964 add_number += S_GET_VALUE (fixP->fx_addsy);
965 add_number -= S_GET_VALUE (fixP->fx_subsy);
966 fixP->fx_offset = add_number;
967 fixP->fx_addsy = NULL;
968 fixP->fx_subsy = NULL;
971 fixP->fx_pcrel = 0;
975 && !S_FORCE_RELOC (fixP->fx_subsy, 0)
976 && !TC_FORCE_RELOCATION_SUB_ABS (fixP, add_symbol_segment))
978 add_number -= S_GET_VALUE (fixP->fx_subsy);
979 fixP->fx_offset = add_number;
980 fixP->fx_subsy = NULL;
983 && !S_FORCE_RELOC (fixP->fx_subsy, 0)
984 && !TC_FORCE_RELOCATION_SUB_LOCAL (fixP, add_symbol_segment))
986 add_number -= S_GET_VALUE (fixP->fx_subsy);
987 fixP->fx_offset = (add_number + fixP->fx_dot_value
988 + fixP->fx_dot_frag->fr_address);
1001 || !fixP->fx_pcrel)
1002 add_number += MD_PCREL_FROM_SECTION (fixP, this_segment);
1003 fixP->fx_subsy = NULL;
1004 fixP->fx_pcrel = 1;
1006 else if (!TC_VALIDATE_FIX_SUB (fixP, add_symbol_segment))
1011 as_bad_where (fixP->fx_file, fixP->fx_line,
1014 as_bad_where (fixP->fx_file, fixP->fx_line,
1016 fixP->fx_addsy ? S_GET_NAME (fixP->fx_addsy) : "0",
1018 S_GET_NAME (fixP->fx_subsy),
1023 && MD_APPLY_SYM_VALUE (fixP))
1024 add_number -= S_GET_VALUE (fixP->fx_subsy);
1027 if (fixP->fx_addsy)
1030 && !S_FORCE_RELOC (fixP->fx_addsy, 0)
1031 && !TC_FORCE_RELOCATION_LOCAL (fixP))
1036 add_number += S_GET_VALUE (fixP->fx_addsy);
1037 fixP->fx_offset = add_number;
1038 if (fixP->fx_pcrel)
1039 add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment);
1040 fixP->fx_addsy = NULL;
1041 fixP->fx_pcrel = 0;
1044 && !S_FORCE_RELOC (fixP->fx_addsy, 0)
1045 && !TC_FORCE_RELOCATION_ABS (fixP))
1047 add_number += S_GET_VALUE (fixP->fx_addsy);
1048 fixP->fx_offset = add_number;
1049 fixP->fx_addsy = NULL;
1053 && MD_APPLY_SYM_VALUE (fixP))
1054 add_number += S_GET_VALUE (fixP->fx_addsy);
1057 if (fixP->fx_pcrel)
1059 add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment);
1060 if (!fixP->fx_done && fixP->fx_addsy == NULL)
1066 fixP->fx_addsy = abs_section_sym;
1070 if (!fixP->fx_done)
1071 md_apply_fix (fixP, &add_number, this_segment);
1073 if (!fixP->fx_done)
1075 if (fixP->fx_addsy == NULL)
1076 fixP->fx_addsy = abs_section_sym;
1077 symbol_mark_used_in_reloc (fixP->fx_addsy);
1078 if (fixP->fx_subsy != NULL)
1079 symbol_mark_used_in_reloc (fixP->fx_subsy);
1082 if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && fixP->fx_size != 0)
1084 if (fixP->fx_size < sizeof (valueT))
1090 mask <<= fixP->fx_size * 8 - (fixP->fx_signed ? 1 : 0);
1094 sprint_value (buf, fragP->fr_address + fixP->fx_where);
1099 as_bad_where (fixP->fx_file, fixP->fx_line,
1101 buf2, fixP->fx_size, buf);
1109 && fixP->fx_size == 2
1111 as_bad_where (fixP->fx_file, fixP->fx_line,
1114 (long) (fragP->fr_address + fixP->fx_where));
1124 print_fixup (fixP);
1208 fixS *fixp;
1217 for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next)
1218 if (!fixp->fx_done)
1246 for (fixp = seginfo->fix_root; fixp != (fixS *) NULL; fixp = fixp->fx_next)
1257 if (fixp->fx_done)
1260 fx_size = fixp->fx_size;
1261 slack = TC_FX_SIZE_SLACK (fixp);
1264 loc = fixp->fx_where + fx_size;
1265 if (slack >= 0 && loc > fixp->fx_frag->fr_fix)
1266 as_bad_where (fixp->fx_file, fixp->fx_line,
1270 *reloc = tc_gen_reloc (sec, fixp);
1272 reloc = tc_gen_reloc (sec, fixp);
1289 install_reloc (sec, *reloc, fixp->fx_frag,
1290 fixp->fx_file, fixp->fx_line);
2878 print_fixup (fixS *fixp)
2882 fprintf_vma (stderr, (bfd_vma)((bfd_hostptr_t) fixp));
2883 fprintf (stderr, " %s:%d",fixp->fx_file, fixp->fx_line);
2884 if (fixp->fx_pcrel)
2886 if (fixp->fx_pcrel_adjust)
2887 fprintf (stderr, " pcrel_adjust=%d", fixp->fx_pcrel_adjust);
2888 if (fixp->fx_im_disp)
2891 fprintf (stderr, " im_disp=%d", fixp->fx_im_disp);
2896 if (fixp->fx_tcbit)
2898 if (fixp->fx_done)
2900 fprintf (stderr, "\n size=%d frag=", fixp->fx_size);
2901 fprintf_vma (stderr, (bfd_vma) ((bfd_hostptr_t) fixp->fx_frag));
2903 (long) fixp->fx_where,
2904 (unsigned long) fixp->fx_offset,
2905 (unsigned long) fixp->fx_addnumber);
2906 fprintf (stderr, "\n %s (%d)", bfd_get_reloc_code_name (fixp->fx_r_type),
2907 fixp->fx_r_type);
2908 if (fixp->fx_addsy)
2911 print_symbol_value_1 (stderr, fixp->fx_addsy);
2914 if (fixp->fx_subsy)
2917 print_symbol_value_1 (stderr, fixp->fx_subsy);
2922 TC_FIX_DATA_PRINT (stderr, fixp);