Lines Matching full:fixp
3867 sh_fix_adjustable (fixS *fixP)
3869 if (fixP->fx_r_type == BFD_RELOC_32_PLT_PCREL
3870 || fixP->fx_r_type == BFD_RELOC_32_GOT_PCREL
3871 || fixP->fx_r_type == BFD_RELOC_SH_GOT20
3872 || fixP->fx_r_type == BFD_RELOC_SH_GOTPC
3873 || fixP->fx_r_type == BFD_RELOC_SH_GOTFUNCDESC
3874 || fixP->fx_r_type == BFD_RELOC_SH_GOTFUNCDESC20
3875 || fixP->fx_r_type == BFD_RELOC_SH_GOTOFFFUNCDESC
3876 || fixP->fx_r_type == BFD_RELOC_SH_GOTOFFFUNCDESC20
3877 || fixP->fx_r_type == BFD_RELOC_SH_FUNCDESC
3878 || ((fixP->fx_r_type == BFD_RELOC_32) && dont_adjust_reloc_32)
3879 || fixP->fx_r_type == BFD_RELOC_RVA)
3883 if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
3884 || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
3935 /* Apply fixup FIXP to SIZE-byte field BUF given that VAL is its
3936 assembly-time value. If we're generating a reloc for FIXP,
3941 apply_full_field_fix (fixS *fixP, char *buf, bfd_vma val, int size)
3945 if (fixP->fx_addsy != NULL || fixP->fx_pcrel)
3947 howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
3950 fixP->fx_addnumber = val;
3960 md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
3962 char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
3972 fixP->fx_pcrel)
3976 gas_assert (fixP->fx_r_type != BFD_RELOC_64);
3979 switch (fixP->fx_r_type)
3985 fixP->fx_r_type = BFD_RELOC_32_PCREL;
4016 && fixP->fx_addsy != NULL
4017 && S_IS_WEAK (fixP->fx_addsy))
4018 val -= S_GET_VALUE (fixP->fx_addsy);
4020 if (SWITCH_TABLE (fixP))
4021 val -= S_GET_VALUE (fixP->fx_subsy);
4025 switch (fixP->fx_r_type)
4120 if ((fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy))
4121 && (fixP->fx_subsy == NULL || S_IS_DEFINED (fixP->fx_addsy)))
4126 if ((fixP->fx_frag->fr_address + fixP->fx_where + val) & 3)
4127 as_bad_where (fixP->fx_file, fixP->fx_line,
4133 as_bad_where (fixP->fx_file, fixP->fx_line, _("negative offset"));
4151 as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
4158 as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
4165 as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
4172 as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
4179 apply_full_field_fix (fixP, buf, *valP, 8);
4185 apply_full_field_fix (fixP, buf, val, 4);
4189 apply_full_field_fix (fixP, buf, val, 2);
4194 fixP->fx_addnumber = val;
4210 fixP->fx_done = 0;
4218 val = fixP->fx_offset;
4219 if (fixP->fx_subsy)
4220 val -= S_GET_VALUE (fixP->fx_subsy);
4221 apply_full_field_fix (fixP, buf, val, 4);
4242 apply_full_field_fix (fixP, buf, val, 4);
4248 S_SET_THREAD_LOCAL (fixP->fx_addsy);
4259 apply_full_field_fix (fixP, buf, 0, 4);
4264 S_SET_THREAD_LOCAL (fixP->fx_addsy);
4268 apply_full_field_fix (fixP, buf, val, 4);
4274 shmedia_md_apply_fix (fixP, valP);
4284 as_bad_where (fixP->fx_file, fixP->fx_line, _("misaligned offset"));
4295 as_bad_where (fixP->fx_file, fixP->fx_line, _("offset out of range"));
4300 fixP->fx_no_overflow = 1;
4302 if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
4303 fixP->fx_done = 1;
4402 md_pcrel_from (fixS *fixP)
4404 return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2;
4408 md_pcrel_from_section (fixS *fixP, segT sec)
4410 if (! sh_local_pcrel (fixP)
4411 && fixP->fx_addsy != (symbolS *) NULL
4412 && (generic_force_reloc (fixP)
4413 || S_GET_SEGMENT (fixP->fx_addsy) != sec))
4419 return fixP->fx_subsy ? fixP->fx_where + fixP->fx_frag->fr_address : 0;
4422 return md_pcrel_from (fixP);
4428 tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
4435 *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
4436 rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
4438 r_type = fixp->fx_r_type;
4440 if (SWITCH_TABLE (fixp))
4442 *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy);
4443 rel->addend = rel->address - S_GET_VALUE(fixp->fx_subsy);
4454 rel->addend = fixp->fx_addnumber;
4456 rel->addend = fixp->fx_offset;
4458 rel->addend = fixp->fx_offset;
4461 rel->addend = fixp->fx_offset;
4464 rel->addend = fixp->fx_offset;
4465 else if (r_type == BFD_RELOC_SH_LABEL && fixp->fx_pcrel)
4468 rel->address = rel->addend = fixp->fx_offset;
4471 else if (shmedia_init_reloc (rel, fixp))
4475 rel->addend = fixp->fx_addnumber;
4481 as_bad_where (fixp->fx_file, fixp->fx_line,
4490 rel->addend += fixp->fx_offset - 4;