Lines Matching defs:plt
78 /* Allocate space in .plt, .got and associated reloc sections for
103 plt_entry_size = htab->plt.plt_entry_size;
107 /* We can't use the GOT PLT if pointer equality is needed since
114 && h->plt.refcount > 0
117 /* Don't use the regular PLT if there are both GOT and GOTPLT
119 h->plt.offset = (bfd_vma) -1;
121 /* Use the GOT PLT. */
125 /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
130 /* GOTOFF relocation needs PLT. */
132 h->plt.refcount = 1;
136 (htab->plt.has_plt0
142 if (h->plt.offset != (bfd_vma) -1 && s != NULL)
144 /* Use the second PLT section if it is created. */
147 /* Make room for this entry in the second PLT section. */
156 /* Don't create the PLT entry if there are only function pointer
159 && (h->plt.refcount > 0
183 /* If this is the first .plt entry, make room for the special
184 first entry. The .plt section is used by prelink to undo
187 s->size = htab->plt.has_plt0 * plt_entry_size;
193 h->plt.offset = s->size;
200 .plt. This is required to make function pointers compare
203 NB: If PLT is PC-relative, we can use the .plt in PIE for
215 /* We need to make a call to the entry of the GOT PLT
216 instead of regular PLT entry. */
225 second PLT instead of regular PLT entry. */
232 h->root.u.def.value = h->plt.offset;
246 /* We also need to make an entry in the .got.plt section,
251 /* There should be no PLT relocation against resolved
255 /* We also need to make an entry in the .rel.plt
264 /* VxWorks has a second set of relocations for each PLT entry
268 /* There are two relocations for the initial PLT entry: an
273 if (h->plt.offset == plt_entry_size)
276 /* There are two extra relocations for each subsequent PLT entry:
278 relocation for the PLT entry. */
286 h->plt.offset = (bfd_vma) -1;
293 h->plt.offset = (bfd_vma) -1;
391 function rather than going via the plt. If people want
435 /* Keep dynamic non-GOT/non-PLT relocation so
436 that we can branch to 0 without PLT. */
451 non-PLT reloations. */
551 /* Allocate space in .plt, .got and associated reloc sections for
1812 /* Create SFrame stack trace info for the plt entries in the .plt section
1826 /* The dynamic plt section for which .sframe stack trace information is being
1849 = htab->plt.has_plt0 ? htab->sframe_plt->plt0_entry_size : 0;
2399 /* Allocate global sym .plt and .got entries, and space for global
2404 /* Allocate .plt and .got entries, and space for local symbols. */
2414 PR ld/13302: We start next_irelative_index at the end of .rela.plt
2429 lazy TLS relocations, don't generate the PLT and GOT entries
2440 htab->elf.splt->size = htab->plt.plt_entry_size;
2442 htab->elf.splt->size += htab->plt.plt_entry_size;
2448 /* Don't allocate .got.plt section if there are no GOT nor PLT
2486 htab->plt_eh_frame->size = htab->plt.eh_frame_plt_size;
2495 /* Unwind info for the second PLT and .plt.got sections are
2507 .plt section. */
2541 /* SFrame stack trace info for the second PLT. */
2629 .rel.plt. We must create both sections in
2655 && !bfd_link_align_section (s, htab->plt.iplt_alignment))
2673 htab->plt.eh_frame_plt,
2754 needed. .got.plt section may be needed for static IFUNC. */
2863 dyn.d_un.d_ptr = htab->plt.plt_entry_size;
2878 /* Adjust .eh_frame for .plt section. */
2906 /* Adjust .eh_frame for .plt.got section. */
2933 /* Adjust .eh_frame for the second PLT section. */
3186 to its PLT entry, which should be resolved by R_*_IRELATIVE at
3198 && h->plt.offset != (bfd_vma) -1
3216 plt_offset = h->plt.offset;
3356 if (h->plt.offset != (bfd_vma) -1
3384 on by an input relocatable file and there is a non-GOT/non-PLT
3402 /* STT_GNU_IFUNC symbol must go through PLT. */
3406 calls via local PLT. */
3431 /* Increment PLT reference count only for PC-relative
3434 if (h->plt.refcount <= 0)
3435 h->plt.refcount = 1;
3437 h->plt.refcount += 1;
3441 /* GOTOFF relocation needs PLT. */
3443 h->plt.refcount = 1;
3446 if (h->plt.refcount <= 0)
3448 h->plt.offset = (bfd_vma) -1;
3460 if (h->plt.refcount <= 0
3470 h->plt.offset = (bfd_vma) -1;
3477 /* It's possible that we incorrectly decided a .plt reloc was needed
3482 h->plt.offset = (bfd_vma) -1;
3614 if (h->plt.refcount > 0
3769 /* Allocate space for @plt suffixes. */
3774 size += strlen ((*p->sym_ptr_ptr)->name) + sizeof ("@plt");
3798 /* Check .got.plt and then .got to get the _GLOBAL_OFFSET_TABLE_
3800 asection *sec = bfd_get_section_by_name (abfd, ".got.plt");
3815 /* Check for each PLT section. */
3824 asection *plt;
3830 plt = plt_p->sec;
3834 /* Skip PLT0 in lazy PLT. */
3844 /* Check each PLT entry against dynamic relocations. */
3892 s->section = plt;
3893 s->the_bfd = plt->owner;
3915 memcpy (names, "@plt", sizeof ("@plt"));
3916 names += sizeof ("@plt");
3919 /* There should be only one entry in PLT for a given
3920 symbol. Set howto to NULL after processing a PLT
3921 entry to guard against corrupted PLT. */
3928 /* PLT entries with R_386_TLS_DESC relocations are skipped. */
4556 still be used with LD_AUDIT or LD_PROFILE if PLT entry is used for
4558 htab->plt.has_plt0 = 1;
4559 htab->plt.plt_indirect_branch_offset = 0;
4568 htab->plt.plt_indirect_branch_offset = 4;
4585 && (!htab->plt.has_plt0 || pltsec == NULL))
4610 /* If the non-lazy PLT is available, use it for all PLT entries if
4611 there are no PLT0 or no .plt section. */
4615 htab->plt.plt_entry = htab->non_lazy_plt->pic_plt_entry;
4617 htab->plt.plt_entry = htab->non_lazy_plt->plt_entry;
4618 htab->plt.plt_entry_size = htab->non_lazy_plt->plt_entry_size;
4619 htab->plt.plt_got_offset = htab->non_lazy_plt->plt_got_offset;
4620 htab->plt.plt_got_insn_size
4622 htab->plt.eh_frame_plt_size
4624 htab->plt.eh_frame_plt = htab->non_lazy_plt->eh_frame_plt;
4630 htab->plt.plt0_entry = htab->lazy_plt->pic_plt0_entry;
4631 htab->plt.plt_entry = htab->lazy_plt->pic_plt_entry;
4635 htab->plt.plt0_entry = htab->lazy_plt->plt0_entry;
4636 htab->plt.plt_entry = htab->lazy_plt->plt_entry;
4638 htab->plt.plt_entry_size = htab->lazy_plt->plt_entry_size;
4639 htab->plt.plt_got_offset = htab->lazy_plt->plt_got_offset;
4640 htab->plt.plt_got_insn_size
4642 htab->plt.eh_frame_plt_size
4644 htab->plt.eh_frame_plt = htab->lazy_plt->eh_frame_plt;
4664 /* Align .got and .got.plt sections to their entry size. Do it here
4680 plt_alignment = bfd_log2 (htab->plt.plt_entry_size);
4713 ".plt.got",
4717 info->callbacks->fatal (_("%P: failed to create GOT PLT section\n"));
4727 /* Create the second PLT for Intel IBT support. IBT
4728 PLT is needed only for lazy binding. */
4730 ".plt.sec",
4734 info->callbacks->fatal (_("%P: failed to create IBT-enabled PLT section\n"));
4752 info->callbacks->fatal (_("%P: failed to create PLT .eh_frame section\n"));
4763 info->callbacks->fatal (_("%P: failed to create GOT PLT .eh_frame section\n"));
4775 info->callbacks->fatal (_("%P: failed to create the second PLT .eh_frame section\n"));
4790 info->callbacks->fatal (_("%P: failed to create PLT .sframe section\n"));
4799 /* Second PLT is generated for Intel IBT + lazy plt. */
4806 info->callbacks->fatal (_("%P: failed to create second PLT .sframe section\n"));
4812 /* .plt.got. */
4819 info->callbacks->fatal (_("%P: failed to create PLT GOT .sframe section\n"));
4841 htab->plt.iplt_alignment = (normal_target