Home | History | Annotate | Download | only in bfd

Lines Matching defs:glink

179 /* glink call stub instructions.  We enter with the index in R0.  */
209 /* .glink entries for the first 32k functions are two instructions. */
3150 entry syms. Also generate @plt symbols for the glink branch table. */
3348 asection *dynamic, *glink = NULL, *relplt = NULL;
3378 /* Get start of .glink stubs from DT_PPC64_GLINK. */
3404 /* The first glink stub starts at offset 32; see
3407 /* The .glink section usually does not survive the final
3409 glink stubs now reside. */
3410 glink = bfd_sections_find_if (abfd, section_covers_vma,
3419 if (glink != NULL)
3422 from the first glink stub. */
3426 while (bfd_get_section_contents (abfd, glink, buf,
3427 glink_vma + off - glink->vma, 4))
3530 if (glink != NULL && relplt != NULL)
3534 /* Add a symbol for the main glink trampoline. */
3538 s->section = glink;
3539 s->value = resolv_vma - glink->vma;
3548 stub rather than on the glink branch table entry. The
3561 find the glink branch itself) when setting breakpoints
3574 s->section = glink;
3575 s->value = glink_vma - glink->vma;
3953 asection *glink;
4270 /* Create .glink for lazy dynamic linking support. */
4271 htab->glink = bfd_make_section_anyway_with_flags (dynobj, ".glink",
4273 if (htab->glink == NULL
4274 || ! bfd_set_section_alignment (dynobj, htab->glink, 3))
9419 /* Make room for the .glink code. */
9420 s = htab->glink;
9621 to set up space for global entry stubs. These are put in glink,
9646 s = htab->glink;
9833 /* Stash the end of glink branch table. */
9834 if (htab->glink != NULL)
9835 htab->glink->rawsize = htab->glink->size;
9889 || s == htab->glink
10154 the appropriate glink entry if so.
10252 + htab->glink->output_offset
10253 + htab->glink->output_section->vma);
12341 && htab->glink != NULL && htab->glink->size != 0)
12343 htab->glink->reloc_count = 1;
12344 htab->glink->flags |= SEC_RELOC;
12358 if (htab->glink != NULL && htab->glink->size != 0)
12441 if (htab->glink != NULL && htab->glink->size != 0)
12452 /* Offset to .glink, written later. */
12454 /* .glink size. */
12455 bfd_put_32 (htab->elf.dynobj, htab->glink->size - 8, p);
12592 s = htab->glink;
12691 if (htab->glink != NULL && htab->glink->size != 0)
12696 /* Build the .glink plt call stub. */
12707 h->root.u.def.section = htab->glink;
12721 Elf_Internal_Rela *r = get_relocs (htab->glink, 1);
12724 r->r_offset = (htab->glink->output_offset
12725 + htab->glink->output_section->vma);
12729 p = htab->glink->contents;
12730 plt0 -= htab->glink->output_section->vma + htab->glink->output_offset;
12731 bfd_put_64 (htab->glink->owner, plt0, p);
12735 bfd_put_32 (htab->glink->owner, MFLR_R12, p);
12737 bfd_put_32 (htab->glink->owner, BCL_20_31, p);
12739 bfd_put_32 (htab->glink->owner, MFLR_R11, p);
12741 bfd_put_32 (htab->glink->owner, LD_R2_0R11 | (-16 & 0xfffc), p);
12743 bfd_put_32 (htab->glink->owner, MTLR_R12, p);
12745 bfd_put_32 (htab->glink->owner, ADD_R11_R2_R11, p);
12747 bfd_put_32 (htab->glink->owner, LD_R12_0R11, p);
12749 bfd_put_32 (htab->glink->owner, LD_R2_0R11 | 8, p);
12751 bfd_put_32 (htab->glink->owner, MTCTR_R12, p);
12753 bfd_put_32 (htab->glink->owner, LD_R11_0R11 | 16, p);
12758 bfd_put_32 (htab->glink->owner, MFLR_R0, p);
12760 bfd_put_32 (htab->glink->owner, BCL_20_31, p);
12762 bfd_put_32 (htab->glink->owner, MFLR_R11, p);
12764 bfd_put_32 (htab->glink->owner, LD_R2_0R11 | (-16 & 0xfffc), p);
12766 bfd_put_32 (htab->glink->owner, MTLR_R0, p);
12768 bfd_put_32 (htab->glink->owner, SUB_R12_R12_R11, p);
12770 bfd_put_32 (htab->glink->owner, ADD_R11_R2_R11, p);
12772 bfd_put_32 (htab->glink->owner, ADDI_R0_R12 | (-48 & 0xffff), p);
12774 bfd_put_32 (htab->glink->owner, LD_R12_0R11, p);
12776 bfd_put_32 (htab->glink->owner, SRDI_R0_R0_2, p);
12778 bfd_put_32 (htab->glink->owner, MTCTR_R12, p);
12780 bfd_put_32 (htab->glink->owner, LD_R11_0R11 | 8, p);
12783 bfd_put_32 (htab->glink->owner, BCTR, p);
12785 while (p - htab->glink->contents < GLINK_CALL_STUB_SIZE)
12787 bfd_put_32 (htab->glink->owner, NOP, p);
12791 /* Build the .glink lazy link call stubs. */
12793 while (p < htab->glink->contents + htab->glink->rawsize)
12799 bfd_put_32 (htab->glink->owner, LI_R0_0 | indx, p);
12804 bfd_put_32 (htab->glink->owner, LIS_R0_0 | PPC_HI (indx), p);
12806 bfd_put_32 (htab->glink->owner, ORI_R0_R0_0 | PPC_LO (indx),
12811 bfd_put_32 (htab->glink->owner,
12812 B_DOT | ((htab->glink->contents - p + 8) & 0x3fffffc), p);
12817 /* Build .glink global entry stubs. */
12818 if (htab->glink->size > htab->glink->rawsize)
14922 defined in glink. Leave the value if there were
15032 s = htab->glink;
15035 of glink rather than the first entry point, which is
15130 if (htab->glink != NULL
15131 && htab->glink->reloc_count != 0
15133 htab->glink,
15134 elf_section_data (htab->glink)->rela.hdr,
15135 elf_section_data (htab->glink)->relocs,
15178 if (htab->glink != NULL && htab->glink->size != 0)
15184 /* Offset to .glink. */
15185 val = (htab->glink->output_section->vma
15186 + htab->glink->output_offset
15195 htab->glink->name);
15200 /* .glink size. */