Lines Matching full:fixp
2951 tc_i386_fix_adjustable (fixS *fixP ATTRIBUTE_UNUSED)
2960 && (S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_MERGE) != 0
2961 && fixP->fx_pcrel)
2966 if (GOT_symbol && fixP->fx_subsy == GOT_symbol
2967 && fixP->fx_r_type == BFD_RELOC_32_PCREL)
2972 if (fixP->fx_r_type == BFD_RELOC_SIZE32
2973 || fixP->fx_r_type == BFD_RELOC_SIZE64
2974 || fixP->fx_r_type == BFD_RELOC_386_GOTOFF
2975 || fixP->fx_r_type == BFD_RELOC_386_PLT32
2976 || fixP->fx_r_type == BFD_RELOC_386_GOT32
2977 || fixP->fx_r_type == BFD_RELOC_386_TLS_GD
2978 || fixP->fx_r_type == BFD_RELOC_386_TLS_LDM
2979 || fixP->fx_r_type == BFD_RELOC_386_TLS_LDO_32
2980 || fixP->fx_r_type == BFD_RELOC_386_TLS_IE_32
2981 || fixP->fx_r_type == BFD_RELOC_386_TLS_IE
2982 || fixP->fx_r_type == BFD_RELOC_386_TLS_GOTIE
2983 || fixP->fx_r_type == BFD_RELOC_386_TLS_LE_32
2984 || fixP->fx_r_type == BFD_RELOC_386_TLS_LE
2985 || fixP->fx_r_type == BFD_RELOC_386_TLS_GOTDESC
2986 || fixP->fx_r_type == BFD_RELOC_386_TLS_DESC_CALL
2987 || fixP->fx_r_type == BFD_RELOC_X86_64_PLT32
2988 || fixP->fx_r_type == BFD_RELOC_X86_64_GOT32
2989 || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCREL
2990 || fixP->fx_r_type == BFD_RELOC_X86_64_TLSGD
2991 || fixP->fx_r_type == BFD_RELOC_X86_64_TLSLD
2992 || fixP->fx_r_type == BFD_RELOC_X86_64_DTPOFF32
2993 || fixP->fx_r_type == BFD_RELOC_X86_64_DTPOFF64
2994 || fixP->fx_r_type == BFD_RELOC_X86_64_GOTTPOFF
2995 || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF32
2996 || fixP->fx_r_type == BFD_RELOC_X86_64_TPOFF64
2997 || fixP->fx_r_type == BFD_RELOC_X86_64_GOTOFF64
2998 || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPC32_TLSDESC
2999 || fixP->fx_r_type == BFD_RELOC_X86_64_TLSDESC_CALL
3000 || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
3001 || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
6797 fixS *fixP;
6864 fixP = fix_new_exp (frag_now, p - frag_now->fr_literal, size,
6874 fixP->fx_signed = 1;
8978 fixS *fixP;
8981 fixP = fix_new (fragP, old_fr_fix, 1,
8985 fixP->fx_signed = 1;
9127 /* Apply a fixup (fixP) to segment data, once it has been determined
9137 md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
9139 char *p = fixP->fx_where + fixP->fx_frag->fr_literal;
9143 if (fixP->fx_pcrel)
9145 switch (fixP->fx_r_type)
9151 fixP->fx_r_type = BFD_RELOC_64_PCREL;
9155 fixP->fx_r_type = BFD_RELOC_32_PCREL;
9158 fixP->fx_r_type = BFD_RELOC_16_PCREL;
9161 fixP->fx_r_type = BFD_RELOC_8_PCREL;
9166 if (fixP->fx_addsy != NULL
9167 && (fixP->fx_r_type == BFD_RELOC_32_PCREL
9168 || fixP->fx_r_type == BFD_RELOC_64_PCREL
9169 || fixP->fx_r_type == BFD_RELOC_16_PCREL
9170 || fixP->fx_r_type == BFD_RELOC_8_PCREL
9171 || fixP->fx_r_type == BFD_RELOC_X86_64_PC32_BND)
9184 value += fixP->fx_where + fixP->fx_frag->fr_address;
9189 segT sym_seg = S_GET_SEGMENT (fixP->fx_addsy);
9192 || (symbol_section_p (fixP->fx_addsy)
9194 && !generic_force_reloc (fixP))
9200 value += fixP->fx_where + fixP->fx_frag->fr_address;
9207 if (S_GET_SEGMENT (fixP->fx_addsy) != seg
9208 || S_IS_WEAK (fixP->fx_addsy))
9209 value += md_pcrel_from (fixP);
9213 if (fixP->fx_addsy != NULL
9214 && S_IS_WEAK (fixP->fx_addsy)
9216 && ! fixP->fx_pcrel)
9223 if (S_GET_SEGMENT (fixP->fx_addsy) != NULL
9224 && S_GET_SEGMENT (fixP->fx_addsy)->flags & SEC_CODE)
9228 value -= S_GET_VALUE (fixP->fx_addsy);
9235 if (IS_ELF && fixP->fx_addsy)
9236 switch (fixP->fx_r_type)
9265 S_SET_THREAD_LOCAL (fixP->fx_addsy);
9271 S_SET_THREAD_LOCAL (fixP->fx_addsy);
9272 fixP->fx_done = 0;
9282 fixP->fx_done = 0;
9293 if (fixP->fx_addsy == NULL)
9294 fixP->fx_done = 1;
9296 else if (fixP->fx_addsy != NULL && S_IS_WEAK (fixP->fx_addsy))
9298 fixP->fx_done = 0;
9300 fixP->fx_addnumber = value;
9307 fixP->fx_no_overflow = 1;
9309 fixP->fx_addnumber = value;
9313 md_number_to_chars (p, value, fixP->fx_size);
10294 md_pcrel_from (fixS *fixP)
10296 return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address;
10318 i386_validate_fix (fixS *fixp)
10320 if (fixp->fx_subsy && fixp->fx_subsy == GOT_symbol)
10322 if (fixp->fx_r_type == BFD_RELOC_32_PCREL)
10326 fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL;
10331 fixp->fx_r_type = BFD_RELOC_386_GOTOFF;
10333 fixp->fx_r_type = BFD_RELOC_X86_64_GOTOFF64;
10335 fixp->fx_subsy = 0;
10340 tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
10345 switch (fixp->fx_r_type)
10350 if (S_IS_DEFINED (fixp->fx_addsy)
10351 && !S_IS_EXTERNAL (fixp->fx_addsy))
10355 valueT value = S_GET_SIZE (fixp->fx_addsy) + fixp->fx_offset;
10356 if (fixp->fx_r_type == BFD_RELOC_SIZE32
10358 as_bad_where (fixp->fx_file, fixp->fx_line,
10360 fixp->fx_addsy = NULL;
10361 fixp->fx_subsy = NULL;
10362 md_apply_fix (fixp, (valueT *) &value, NULL);
10407 code = fixp->fx_r_type;
10410 if (!fixp->fx_pcrel)
10413 code = fixp->fx_r_type;
10417 if (fixp->fx_pcrel)
10419 switch (fixp->fx_size)
10422 as_bad_where (fixp->fx_file, fixp->fx_line,
10424 fixp->fx_size);
10430 code = (fixp->fx_r_type == BFD_RELOC_X86_64_PC32_BND
10431 ? fixp-> fx_r_type : BFD_RELOC_32_PCREL);
10440 switch (fixp->fx_size)
10443 as_bad_where (fixp->fx_file, fixp->fx_line,
10445 fixp->fx_size);
10463 && fixp->fx_addsy == GOT_symbol)
10472 && fixp->fx_addsy == GOT_symbol)
10479 *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
10481 rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
10487 if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
10488 rel->address = fixp->fx_offset;
10490 else if (fixp->fx_addsy && S_IS_WEAK (fixp->fx_addsy))
10491 rel->addend = fixp->fx_addnumber - (S_GET_VALUE (fixp->fx_addsy) * 2);
10511 as_bad_where (fixp->fx_file, fixp->fx_line,
10519 if (!fixp->fx_pcrel)
10520 rel->addend = fixp->fx_offset;
10533 rel->addend = fixp->fx_offset - fixp->fx_size;
10537 - fixp->fx_size
10538 + fixp->fx_addnumber
10539 + md_pcrel_from (fixp));
10547 as_bad_where (fixp->fx_file, fixp->fx_line,