Home | History | Annotate | Download | only in bfd

Lines Matching full:relocation

37 /* Relocation HOWTO functions.  */
198 /* These are macros used to get the relocation accurate value. */
205 /* These are macros used to get the relocation conservative value. */
279 /* For checking relocation type. */
318 /* Relocations used for relocation. */
336 /* A 16 bit absolute relocation. */
351 /* A 32 bit absolute relocation. */
381 /* An PC Relative 9-bit relocation, shifted by 2.
403 /* A relative 15 bit relocation, right shifted by 1. */
418 /* A relative 17 bit relocation, right shifted by 1. */
433 /* A relative 25 bit relocation
617 /* A 16 bit absolute relocation. */
632 /* A 32 bit absolute relocation. */
676 /* A relative 15 bit relocation, right shifted by 1. */
691 /* A relative 17 bit relocation, right shifted by 1. */
706 /* A relative 25 bit relocation, right shifted by 2. */
997 /* An PC Relative 20-bit relocation used when setting PIC offset
1042 /* An PC Relative relocation used when setting PIC offset table register.
1742 /* A relative 17 bit relocation for ifc, right shifted by 1. */
1757 /* A relative unsigned 10 bit relocation for ifc, right shifted by 1. */
2329 /* Sort relocation by r_offset.
2333 For example, RELAX_ENTRY must be the very first relocation entry.
2406 bfd_signed_vma relocation;
2414 relocation = symbol_value + addend;
2416 relocation -= (input_section->output_section->vma
2420 relocation -= (offset & -(bfd_vma) 2);
2422 if (relocation < -ACCURATE_8BIT_S1 || relocation >= ACCURATE_8BIT_S1)
2429 relocation >>= howto->rightshift;
2430 relocation <<= howto->bitpos;
2432 | (((x & howto->src_mask) + relocation) & howto->dst_mask);
2448 the information we need; we do the actual relocation when we see the LO12.
2470 bfd_vma relocation;
2492 relocation = 0;
2494 relocation = symbol->value;
2496 relocation += symbol->section->output_section->vma;
2497 relocation += symbol->section->output_offset;
2498 relocation += reloc_entry->addend;
2500 /* Save the information, and let LO12 do the actual relocation. */
2506 n->addend = relocation;
2538 /* Do an R_NDS32_LO12 relocation. This is a straightforward 12 bit
2539 inplace relocation; this function exists in order to do the
2540 R_NDS32_HI20_[SU]LO relocation described above. */
2569 /* Do the HI20 relocation. Note that we actually don't need
2617 /* Do generic partial_inplace relocation.
2626 bfd_vma relocation;
2654 relocation = 0;
2656 relocation = symbol->value;
2661 relocation += symbol->section->output_section->vma;
2662 relocation += symbol->section->output_offset;
2665 relocation += reloc_entry->addend;
2669 relocation >>= 3;
2673 relocation >>= 2;
2677 relocation >>= 1;
2682 relocation >>= 0;
2690 (((x & reloc_entry->howto->src_mask) + relocation) & \
2757 relocation types which don't need to be relocated
2758 like relaxation relocation types.
4171 bfd_vma relocation, bfd_byte *location)
4179 /* If the size is negative, negate RELOCATION. This isn't very
4182 relocation = -relocation;
4219 a = (relocation & addrmask) >> rightshift;
4296 /* Put RELOCATION in the right bits. */
4297 relocation >>= (bfd_vma) rightshift;
4298 relocation <<= (bfd_vma) bitpos;
4300 /* Add RELOCATION to the right bits of X. */
4302 Because the relaxation may generate duplicate relocation at one address,
4303 an addition to immediate in the instruction may cause the relocation added
4308 | (((x & howto->src_mask) + relocation) & howto->dst_mask));
4310 x = ((x & ~howto->dst_mask) | ((relocation) & howto->dst_mask));
4338 bfd_vma relocation;
4344 /* This function assumes that we are dealing with a basic relocation
4348 relocation = value + addend;
4350 /* If the relocation is PC relative, we want to set RELOCATION to
4351 the distance between the symbol (currently in RELOCATION) and the
4362 relocation -= (input_section->output_section->vma
4365 relocation -= address;
4368 return nds32_relocate_contents (howto, input_bfd, relocation,
4518 (*_bfd_error_handler) (_("error: IFC relocation error."));
4520 /* Relocation for .ex9.itable. */
4538 bfd_vma relocation;
4551 (*_bfd_error_handler) (_("%B: error: unknown relocation type %d."),
4575 /* Distance to relocation of best fp-base is encoded in R_SYM. */
4605 relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
4616 relocation, unresolved_reloc, warned,
4629 relocation = fpbase_addr;
4663 /* Relocation is relative to the start of the global offset
4674 relocation -= elf_gp (output_bfd);
4679 /* Relocation is to the entry for this symbol in the
4697 relocation = (splt->output_section->vma
4711 relocation -= elf_gp (output_bfd);
4715 relocation = (splt->output_section->vma
4718 relocation -= elf_gp (output_bfd);
4724 /* Relocation is to the entry for this symbol in the
4745 relocation = (splt->output_section->vma
4755 /* .got(_GLOBAL_OFFSET_TABLE_) - pc relocation
4757 relocation = elf_gp (output_bfd);
4763 /* .got(_GLOBAL_OFFSET_TABLE_) - pc relocation
4772 relocation = elf_gp (output_bfd);
4773 relocation -= (input_section->output_section->vma
4784 /* Relocation is to the entry for this symbol in the global
4812 relocation entry to initialize the value. This
4818 bfd_put_32 (output_bfd, relocation, sgot->contents + off);
4822 relocation = sgot->output_section->vma + sgot->output_offset + off
4842 bfd_put_32 (output_bfd, relocation, sgot->contents + off);
4857 outrel.r_addend = relocation;
4866 relocation = sgot->output_section->vma + sgot->output_offset + off
4966 outrel.r_addend = relocation + rel->r_addend;
5003 sec, relocation, addend);
5024 contents, relocation + addend);
5029 contents, offset, relocation,
5067 relocation entry to initialize the value. This
5073 bfd_put_32 (output_bfd, relocation,
5095 bfd_put_32 (output_bfd, relocation, sgot->contents + off);
5110 outrel.r_addend = relocation;
5120 relocation = sgot->output_section->vma + sgot->output_offset + off
5123 if (relocation & align)
5164 This happens when the relocation has a symbol@GOTOFF. */
5174 /* At this point `relocation' contains the object's
5178 relocation -= fpbase_addr;
5181 relocation -= gp;
5186 if (relocation & align)
5210 relocation -= (elf_hash_table (info)->tls_sec->vma + TP_OFFSET);
5215 /* Relocation is to the entry for this symbol in the global
5248 relocation = sgot->output_section->vma + sgot->output_offset + off;
5275 outrel.r_addend = relocation - dtpoff_base (info);
5304 contents, offset, relocation, addend);
5376 rel->r_offset, relocation,
5384 relocation, rel->r_addend);
5428 errmsg = _("internal error: unsupported relocation error");
5723 other relocation sections, we don't have to worry
6378 got section here, since these relocation need got section
6655 /* This relocation describes the C++ object vtable hierarchy.
6663 /* This relocation describes which C++ vtable entries are actually
7961 bfd_vma relocation;
7963 relocation = (sec->output_section->vma
7989 rel->r_addend -= relocation;
7992 return relocation;
8162 /* Find the first relocation of the same relocation-type,
8246 /* Find the first relocation of the same relocation-type,
8277 /* Find a relocation of type specified by `reloc_type'
8282 we find the relocation from `reloc' backward untill relocs,
8310 /* Find a relocation of specified type and offset.
8311 `reloc' is just a refence point to find a relocation at specified offset.
8315 we find the relocation from `reloc' backward untill relocs,
8327 /* First, we try to find a relocation of offset `offset_p',
9025 /* Relax LONGCALL1 relocation for nds32_elf_relax_section. */
9127 /* Relax LONGCALL2 relocation for nds32_elf_relax_section. */
9208 /* Relax LONGCALL3 relocation for nds32_elf_relax_section. */
9347 /* Relax LONGJUMP1 relocation for nds32_elf_relax_section. */
9542 /* Relax LONGJUMP2 relocation for nds32_elf_relax_section. */
9702 /* Relax LONGJUMP3 relocation for nds32_elf_relax_section. */
9949 /* Relax LONGCALL4 relocation for nds32_elf_relax_section. */
10052 /* Relax LONGCALL5 relocation for nds32_elf_relax_section. */
10111 /* Modify relocation and contents. */
10130 /* Relax LONGCALL6 relocation for nds32_elf_relax_section. */
10195 /* Set resolved relocation. */
10245 /* Set resolved relocation. */
10268 /* Relax LONGJUMP4 relocation for nds32_elf_relax_section. */
10355 /* Relax LONGJUMP5 relocation for nds32_elf_relax_section. */
10481 /* Relax LONGJUMP6 relocation for nds32_elf_relax_section. */
10663 /* Relax LONGJUMP7 relocation for nds32_elf_relax_section. */
10767 /* Relax LOADSTORE relocation for nds32_elf_relax_section. */
10795 /* Get the high part relocation. */
10936 /* Relax LO12 relocation for nds32_elf_relax_section. */
11261 /* Relax PTR relocation for nds32_elf_relax_section. */
11313 /* Relax PLT_GOT_SUFF relocation for nds32_elf_relax_section. */
11398 /* Relax GOT_SUFF relocation for nds32_elf_relax_section. */
11432 /* Turn LW to LWI.GP. Change relocation type to R_NDS32_GOT_REL. */
11445 /* Relax PLT_GOT_SUFF relocation for nds32_elf_relax_section. */
11632 /* Remove all LABEL relocation from label_rel to tmp_rel
12068 /* Relocation Types
12080 /* Relocation Types
12092 /* Relocation Types
12513 Insert `rel' into relocation list, relas. */
12558 The relocation associated with that address is returned,
12690 /* Restore the INSN16 relocation. */
12809 relocation. And get the base value when relocating. */
13063 (_("%X%P: %B(%A): relocation \"%R\" goes out of range\n"),
13089 /* List to save jal and j relocation. */
13236 /* Traverse all relocation and gather all of them to build the list. */
13555 /* Delete the redundant code, and clear the relocation. */
13584 bfd_vma relocation, address;
13623 relocation = irel_keeper->irel->r_offset;
13624 relocation = relocation - irel_ptr->irel->r_offset;
13625 while (irel_keeper && relocation > 1022)
13630 relocation = irel_keeper->irel->r_offset;
13631 relocation = relocation - irel_ptr->irel->r_offset;
13634 if (relocation > 1022)
13642 relocation = irel_keeper->irel->r_offset;
13643 relocation = relocation - irel_ptr->irel->r_offset;
13645 if (relocation <= 1022)
13655 insn16 = INSN_IFCALL9 | (relocation >> 1);
13670 relocation = (irel_keeper->irel->r_offset
13676 relocation = relocation - address;
13679 while (irel_keeper && relocation > 1022)
13684 relocation = (irel_keeper->irel->r_offset
13687 relocation = relocation - address;
13691 if (relocation > 1022)
13700 relocation = (irel_keeper->irel->r_offset
13703 relocation = relocation - address;
13705 if (relocation <= 1022)
13715 insn16 = INSN_IFCALL9 | (relocation >> 1);
13748 /* Save relocation for each global symbol but useful?? */
13761 /* For insn that can use relocation or constant ex: sethi. */
13792 /* Relocation list. */
13906 /* Local symbol insn or insn without relocation. */
13972 unsigned long relocation, min_relocation;
13977 /* Local symbol insn or insn without relocation. */
14002 relocation = 0;
14013 relocation = (m_list->h_list->h->root.u.def.value +
14016 relocation += m_list->irel->r_addend;
14019 relocation = 0;
14020 if (relocation < min_relocation)
14021 min_relocation = relocation;
14195 /* Get insn with regs according to relocation type. */
14216 /* Mask number of address bits according to relocation. */
14281 /* Check relocation type if supporting for ex9. */
14418 /* These relocation is supported ex9 relaxation currently. */
14419 /* We have to save the relocation for using later, since we have
14433 /* We have to confirm there is no data relocation in the
14435 /* We have to do ex9 conservative, for those relocation not
14539 /* Check alignment and fetch proper relocation. */
14545 /* Syn the instruction and the relocation. */
14591 /* Insn with relocation. */
14603 /* Insn relocation and format is the same as table entry. */
14721 bfd_vma relocation;
14735 relocation = h->root.u.def.value +
14738 relocation += irel->r_addend;
14740 | ((relocation >> 1) & 0xffffff);
14756 be regard as instruction without relocation. */
14763 /* Instruction without relocation, we only
14788 /* For instuction with relocation do relax. */
14816 /* Clear the relocation that is replaced by ex9. */
14917 bfd_vma relocation = -1;
14930 relocation = h->root.u.def.value +
14933 relocation += ptr->m_list->irel->r_addend;
14936 relocation = 0;
14968 relocation = _bfd_elf_rela_local_sym (link_info->output_bfd, &sym,
14971 relocation += ptr->irel->r_addend;
14979 return relocation;
15124 bfd_vma relocation, min_relocation = 0xffffffff;
15146 relocation = nds32_elf_ex9_reloc_insn (ex9_insn, link_info);
15148 insn_with_reg | ((relocation >> shift) &
15161 relocation = nds32_elf_ex9_reloc_insn (ex9_insn, link_info);
15163 insn_with_reg | (((relocation - gp) >> shift) &
15183 relocation = h->root.u.def.value +
15186 relocation += m_list->irel->r_addend;
15188 if (relocation < min_relocation)
15189 min_relocation = relocation;
15192 relocation = min_relocation;
15196 | ((relocation >> shift) & nds32_elf_irel_mask (&rel_backup));
15198 relocation = relocation + 0x1000; /* hi20 */
15207 insn_with_reg | ((relocation >> shift) &
15210 relocation = relocation + 0x1000; /* hi20 */
15227 relocation =
15231 relocation += fix_ptr->irel->r_addend;
15233 source_insn = insn_with_reg | ((relocation >> shift) & 0xfffff);
15248 (_("Linker: error cannot fixed ex9 relocation \n"));
15262 (_("Linker: error cannot fixed ex9 relocation \n"));
15272 relocation = nds32_elf_ex9_reloc_insn (ex9_insn, link_info);
15274 | ((relocation >> shift) & nds32_elf_irel_mask (&rel_backup));
15281 /* Insn without relocation does not have to be fixed
15322 bfd_vma relocation;
15416 relocation = (isec->output_section->vma + isec->output_offset
15427 /* Maybe there is a better way to get h and relocation */
15430 h, sym_sec, relocation,
15432 relocation += irel->r_addend;
15457 This happens when the relocation has a symbol@GOTOFF. */
15465 relocation -= gp;
15468 if (relocation & align)
15475 irel->r_info, irel->r_addend, relocation, align);
15482 | ((relocation >> shift) & nds32_elf_irel_mask (irel));
15489 be regard as instruction without relocation. */
15597 /* Local symbol and insn without relocation*/