Home | History | Annotate | Download | only in config

Lines Matching full:fixp

3866 sh_fix_adjustable (fixS *fixP)
3868 if (fixP->fx_r_type == BFD_RELOC_32_PLT_PCREL
3869 || fixP->fx_r_type == BFD_RELOC_32_GOT_PCREL
3870 || fixP->fx_r_type == BFD_RELOC_SH_GOT20
3871 || fixP->fx_r_type == BFD_RELOC_SH_GOTPC
3872 || fixP->fx_r_type == BFD_RELOC_SH_GOTFUNCDESC
3873 || fixP->fx_r_type == BFD_RELOC_SH_GOTFUNCDESC20
3874 || fixP->fx_r_type == BFD_RELOC_SH_GOTOFFFUNCDESC
3875 || fixP->fx_r_type == BFD_RELOC_SH_GOTOFFFUNCDESC20
3876 || fixP->fx_r_type == BFD_RELOC_SH_FUNCDESC
3877 || ((fixP->fx_r_type == BFD_RELOC_32) && dont_adjust_reloc_32)
3878 || fixP->fx_r_type == BFD_RELOC_RVA)
3882 if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
3883 || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
3934 /* Apply fixup FIXP to SIZE-byte field BUF given that VAL is its
3935 assembly-time value. If we're generating a reloc for FIXP,
3940 apply_full_field_fix (fixS *fixP, char *buf, bfd_vma val, int size)
3944 if (fixP->fx_addsy != NULL || fixP->fx_pcrel)
3946 howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
3949 fixP->fx_addnumber = val;
3959 md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
3961 char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
3971 if (fixP->fx_pcrel)
3975 gas_assert (fixP->fx_r_type != BFD_RELOC_64);
3978 switch (fixP->fx_r_type)
3984 fixP->fx_r_type = BFD_RELOC_32_PCREL;
4015 && fixP->fx_addsy != NULL
4016 && S_IS_WEAK (fixP->fx_addsy))
4017 val -= S_GET_VALUE (fixP->fx_addsy);
4019 if (SWITCH_TABLE (fixP))
4020 val -= S_GET_VALUE (fixP->fx_subsy);
4024 switch (fixP->fx_r_type)
4119 if ((fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy))
4120 && (fixP->fx_subsy == NULL || S_IS_DEFINED (fixP->fx_addsy)))
4125 if ((fixP->fx_frag->fr_address + fixP->fx_where + val) & 3)
4126 as_bad_where (fixP->fx_file, fixP->fx_line,
4132 as_bad_where (fixP->fx_file, fixP->fx_line, _("negative offset"));
4150 as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
4157 as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
4164 as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
4171 as_bad_where (fixP->fx_file, fixP->fx_line, _("pcrel too far"));
4178 apply_full_field_fix (fixP, buf, *valP, 8);
4184 apply_full_field_fix (fixP, buf, val, 4);
4188 apply_full_field_fix (fixP, buf, val, 2);
4193 fixP->fx_addnumber = val;
4209 fixP->fx_done = 0;
4217 val = fixP->fx_offset;
4218 if (fixP->fx_subsy)
4219 val -= S_GET_VALUE (fixP->fx_subsy);
4220 apply_full_field_fix (fixP, buf, val, 4);
4241 apply_full_field_fix (fixP, buf, val, 4);
4247 S_SET_THREAD_LOCAL (fixP->fx_addsy);
4258 apply_full_field_fix (fixP, buf, 0, 4);
4263 S_SET_THREAD_LOCAL (fixP->fx_addsy);
4267 apply_full_field_fix (fixP, buf, val, 4);
4273 shmedia_md_apply_fix (fixP, valP);
4283 as_bad_where (fixP->fx_file, fixP->fx_line, _("misaligned offset"));
4294 as_bad_where (fixP->fx_file, fixP->fx_line, _("offset out of range"));
4299 fixP->fx_no_overflow = 1;
4301 if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
4302 fixP->fx_done = 1;
4401 md_pcrel_from (fixS *fixP)
4403 return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2;
4407 md_pcrel_from_section (fixS *fixP, segT sec)
4409 if (! sh_local_pcrel (fixP)
4410 && fixP->fx_addsy != (symbolS *) NULL
4411 && (generic_force_reloc (fixP)
4412 || S_GET_SEGMENT (fixP->fx_addsy) != sec))
4418 return fixP->fx_subsy ? fixP->fx_where + fixP->fx_frag->fr_address : 0;
4421 return md_pcrel_from (fixP);
4427 tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
4434 *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
4435 rel->address = fixp->fx_frag->fr_address + fixp->fx_where;
4437 r_type = fixp->fx_r_type;
4439 if (SWITCH_TABLE (fixp))
4441 *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy);
4442 rel->addend = rel->address - S_GET_VALUE(fixp->fx_subsy);
4453 rel->addend = fixp->fx_addnumber;
4455 rel->addend = fixp->fx_offset;
4457 rel->addend = fixp->fx_offset;
4460 rel->addend = fixp->fx_offset;
4463 rel->addend = fixp->fx_offset;
4464 else if (r_type == BFD_RELOC_SH_LABEL && fixp->fx_pcrel)
4467 rel->address = rel->addend = fixp->fx_offset;
4470 else if (shmedia_init_reloc (rel, fixp))
4474 rel->addend = fixp->fx_addnumber;
4480 as_bad_where (fixp->fx_file, fixp->fx_line,
4489 rel->addend += fixp->fx_offset - 4;