Home | History | Annotate | Download | only in bfd

Lines Matching full:htab

3301   struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
3303 if (htab)
3304 htab->params = params;
3312 struct ppc_elf_link_hash_table *htab;
3319 htab = ppc_elf_hash_table (info);
3320 htab->got = s = bfd_get_linker_section (abfd, ".got");
3324 if (htab->is_vxworks)
3326 htab->sgotplt = bfd_get_linker_section (abfd, ".got.plt");
3327 if (!htab->sgotplt)
3340 htab->relgot = bfd_get_linker_section (abfd, ".rela.got");
3341 if (!htab->relgot)
3380 struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
3387 htab->glink = s;
3390 htab->params->ppc476_workaround ? 6 : 4))
3398 htab->glink_eh_frame = s;
3406 htab->iplt = s;
3414 htab->reliplt = s;
3420 &htab->sdata[0]))
3424 &htab->sdata[1]))
3437 struct ppc_elf_link_hash_table *htab;
3441 htab = ppc_elf_hash_table (info);
3443 if (htab->got == NULL
3450 if (htab->glink == NULL
3454 htab->dynbss = bfd_get_linker_section (abfd, ".dynbss");
3457 htab->dynsbss = s;
3463 htab->relbss = bfd_get_linker_section (abfd, ".rela.bss");
3467 htab->relsbss = s;
3473 if (htab->is_vxworks
3474 && !elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2))
3477 htab->relplt = bfd_get_linker_section (abfd, ".rela.plt");
3478 htab->plt = s = bfd_get_linker_section (abfd, ".plt");
3483 if (htab->plt_type == PLT_VXWORKS)
3624 struct ppc_elf_link_hash_table *htab;
3626 htab = ppc_elf_hash_table (info);
3627 if (htab->sbss == NULL)
3631 if (!htab->elf.dynobj)
3632 htab->elf.dynobj = abfd;
3634 htab->sbss = bfd_make_section_anyway_with_flags (htab->elf.dynobj,
3637 if (htab->sbss == NULL)
3641 *secp = htab->sbss;
3865 struct ppc_elf_link_hash_table *htab;
3896 htab = ppc_elf_hash_table (info);
3897 if (htab->glink == NULL)
3899 if (htab->elf.dynobj == NULL)
3900 htab->elf.dynobj = abfd;
3901 if (!ppc_elf_create_glink (htab->elf.dynobj, info))
3904 tga = elf_link_hash_lookup (&htab->elf, "__tls_get_addr",
3938 && htab->got == NULL
3941 if (htab->elf.dynobj == NULL)
3942 htab->elf.dynobj = abfd;
3943 if (!ppc_elf_create_got (htab->elf.dynobj, info))
3945 BFD_ASSERT (h == htab->elf.hgot);
3950 if (h == NULL && !htab->is_vxworks)
3952 Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->sym_cache,
3986 if (!htab->is_vxworks
4048 if (htab->got == NULL)
4050 if (htab->elf.dynobj == NULL)
4051 htab->elf.dynobj = abfd;
4052 if (!ppc_elf_create_got (htab->elf.dynobj, info))
4081 htab->sdata[0].sym->ref_regular = 1;
4082 if (!elf_allocate_pointer_linker_section (abfd, &htab->sdata[0],
4099 htab->sdata[1].sym->ref_regular = 1;
4100 if (!elf_allocate_pointer_linker_section (abfd, &htab->sdata[1],
4111 htab->sdata[0].sym->ref_regular = 1;
4144 htab->sdata[1].sym->ref_regular = 1;
4276 if (h != NULL && h == htab->elf.hgot && htab->plt_type == PLT_UNSET)
4278 htab->plt_type = PLT_OLD;
4279 htab->old_bfd = abfd;
4333 && htab->plt_type == PLT_UNSET)
4344 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
4352 htab->plt_type = PLT_OLD;
4353 htab->old_bfd = abfd;
4356 if (h == NULL || h == htab->elf.hgot)
4386 if (h == htab->elf.hgot)
4388 if (htab->plt_type == PLT_UNSET)
4390 htab->plt_type = PLT_OLD;
4391 htab->old_bfd = abfd;
4454 if (htab->elf.dynobj == NULL)
4455 htab->elf.dynobj = abfd;
4458 (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ TRUE);
4475 p = bfd_alloc (htab->elf.dynobj, sizeof *p);
4500 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
4517 p = bfd_alloc (htab->elf.dynobj, sizeof *p);
4802 struct ppc_elf_link_hash_table *htab;
4805 htab = ppc_elf_hash_table (info);
4807 if (htab->plt_type == PLT_UNSET)
4811 if (htab->params->plt_style == PLT_OLD)
4812 htab->plt_type = PLT_OLD;
4814 && htab->elf.dynamic_sections_created
4815 && (h = elf_link_hash_lookup (&htab->elf, "_mcount",
4828 htab->plt_type = PLT_OLD;
4833 enum ppc_elf_plt_type plt_type = htab->params->plt_style;
4849 htab->old_bfd = ibfd;
4853 htab->plt_type = plt_type;
4856 if (htab->plt_type == PLT_OLD && htab->params->plt_style == PLT_NEW)
4858 if (htab->old_bfd != NULL)
4860 htab->old_bfd);
4865 BFD_ASSERT (htab->plt_type != PLT_VXWORKS);
4867 if (htab->plt_type == PLT_NEW)
4873 if (htab->plt != NULL
4874 && !bfd_set_section_flags (htab->elf.dynobj, htab->plt, flags))
4878 if (htab->got != NULL
4879 htab->elf.dynobj, htab->got, flags))
4885 if (htab->glink != NULL
4886 && !bfd_set_section_alignment (htab->elf.dynobj, htab->glink, 0))
4889 return htab->plt_type == PLT_NEW;
4923 struct ppc_elf_link_hash_table *htab;
4938 htab = ppc_elf_hash_table (info);
4973 if (!htab->is_vxworks
5045 if (h == NULL || h == htab->elf.hgot)
5090 /* Set plt output section type, htab->tls_get_addr, and call the
5096 struct ppc_elf_link_hash_table *htab;
5098 htab = ppc_elf_hash_table (info);
5099 htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr",
5101 if (!htab->params->no_tls_get_addr_opt)
5104 opt = elf_link_hash_lookup (&htab->elf, "__tls_get_addr_opt",
5114 tga = htab->tls_get_addr;
5115 if (htab->elf.dynamic_sections_created
5141 htab->tls_get_addr = opt;
5146 htab->params->no_tls_get_addr_opt = TRUE;
5148 if (htab->plt_type == PLT_NEW
5149 && htab->plt != NULL
5150 && htab->plt->output_section != NULL)
5152 elf_section_type (htab->plt->output_section) = SHT_PROGBITS;
5153 elf_section_flags (htab->plt->output_section) = SHF_ALLOC + SHF_WRITE;
5195 struct ppc_elf_link_hash_table *htab;
5201 htab = ppc_elf_hash_table (info);
5202 if (htab == NULL)
5268 && h == htab->tls_get_addr
5351 htab->tls_get_addr))
5374 ent = find_plt_ent (&htab->tls_get_addr->plt.plist,
5475 struct ppc_elf_link_hash_table *htab;
5484 htab = ppc_elf_hash_table (info);
5485 BFD_ASSERT (htab
5532 && !htab->is_vxworks
5552 && !htab->is_vxworks
5599 && !htab->is_vxworks
5621 s = htab->dynsbss;
5623 s = htab->dynbss;
5635 srel = htab->relsbss;
5637 srel = htab->relbss;
5662 struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
5682 sh = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE);
5688 sh->root.u.def.section = htab->glink;
5703 allocate_got (struct ppc_elf_link_hash_table *htab, unsigned int need)
5708 if (htab->plt_type == PLT_VXWORKS)
5710 where = htab->got->size;
5711 htab->got->size += need;
5715 max_before_header = htab->plt_type == PLT_NEW ? 32768 : 32764;
5716 if (need <= htab->got_gap)
5718 where = max_before_header - htab->got_gap;
5719 htab->got_gap -= need;
5723 if (htab->got->size + need > max_before_header
5724 && htab->got->size <= max_before_header)
5726 htab->got_gap = max_before_header - htab->got->size;
5727 htab->got->size = max_before_header + htab->got_header_size;
5729 where = htab->got->size;
5730 htab->got->size += need;
5743 struct ppc_elf_link_hash_table *htab;
5749 htab = ppc_elf_hash_table (info);
5750 if (htab->elf.dynamic_sections_created
5765 && htab->elf.dynamic_sections_created)
5771 dyn = htab->elf.dynamic_sections_created;
5776 asection *s = htab->plt;
5778 s = htab->iplt;
5780 if (htab->plt_type == PLT_NEW || !dyn || h->dynindx == -1)
5789 s = htab->glink;
5794 if (h == htab->tls_get_addr
5795 && !htab->params->no_tls_get_addr_opt)
5808 if (htab->params->emit_stub_syms
5819 s->size += htab->plt_initial_entry_size;
5825 plt_offset = (htab->plt_initial_entry_size
5826 + (htab->plt_slot_size
5828 - htab->plt_initial_entry_size)
5829 / htab->plt_entry_size)));
5847 s->size += htab->plt_entry_size;
5850 if (htab->plt_type == PLT_OLD
5851 && (s->size - htab->plt_initial_entry_size)
5852 / htab->plt_entry_size
5854 s->size += htab->plt_entry_size;
5862 if (!htab->elf.dynamic_sections_created
5864 htab->reliplt->size += sizeof (Elf32_External_Rela);
5867 htab->relplt->size += sizeof (Elf32_External_Rela);
5869 if (htab->plt_type == PLT_VXWORKS)
5873 && htab->elf.dynamic_sections_created)
5876 == (bfd_vma) htab->plt_initial_entry_size)
5878 htab->srelplt2->size
5883 htab->srelplt2->size
5890 htab->sgotplt->size += 4;
5924 && htab->elf.dynamic_sections_created)
5936 /* We'll just use htab->tlsld_got.offset. This should
5939 htab->tlsld_got.refcount += 1;
5956 eh->elf.got.offset = allocate_got (htab, need);
5957 dyn = htab->elf.dynamic_sections_created;
5963 asection *rsec = htab->relgot;
5966 rsec = htab->reliplt;
5980 || !htab->elf.dynamic_sections_created)
6012 if (htab->is_vxworks)
6085 sreloc = htab->reliplt;
6131 struct ppc_elf_link_hash_table *htab;
6140 htab = ppc_elf_hash_table (info);
6141 BFD_ASSERT (htab->elf.dynobj != NULL);
6148 s = bfd_get_linker_section (htab->elf.dynobj, ".interp");
6155 if (htab->plt_type == PLT_OLD)
6156 htab->got_header_size = 16;
6157 else if (htab->plt_type == PLT_NEW)
6158 htab->got_header_size = 12;
6192 else if (htab->is_vxworks
6203 sreloc = htab->reliplt;
6233 htab->tlsld_got.refcount += 1;
6245 *local_got = allocate_got (htab, need);
6248 asection *srel = htab->relgot;
6250 srel = htab->reliplt;
6258 if (htab->is_vxworks)
6271 s = htab->iplt;
6280 s = htab->glink;
6290 htab->reliplt->size += sizeof (Elf32_External_Rela);
6302 if (htab->tlsld_got.refcount > 0)
6304 htab->tlsld_got.offset = allocate_got (htab, 8);
6306 htab->relgot->size += sizeof (Elf32_External_Rela);
6309 htab->tlsld_got.offset = (bfd_vma) -1;
6311 if (htab->got != NULL && htab->plt_type != PLT_VXWORKS)
6319 if (htab->got->size <= 32768)
6321 g_o_t = htab->got->size;
6322 if (htab->plt_type == PLT_OLD)
6324 htab->got->size += htab->got_header_size;
6327 htab->elf.hgot->root.u.def.value = g_o_t;
6331 struct elf_link_hash_entry *sda = htab->sdata[0].sym;
6333 sda->root.u.def.section = htab->elf.hgot->root.u.def.section;
6334 sda->root.u.def.value = htab->elf.hgot->root.u.def.value;
6338 struct elf_link_hash_entry *sda = htab->sdata[0].sym;
6342 sda = htab->sdata[1].sym;
6347 if (htab->glink != NULL
6348 && htab->glink->size != 0
6349 && htab->elf.dynamic_sections_created)
6351 htab->glink_pltresolve = htab->glink->size;
6353 htab->glink->size += htab->glink->size / (GLINK_ENTRY_SIZE / 4) - 4;
6355 htab->glink->size += -htab->glink->size & (htab->params->ppc476_workaround
6357 htab->glink->size += GLINK_PLTRESOLVE;
6359 if (htab->params->emit_stub_syms)
6362 sh = elf_link_hash_lookup (&htab->elf, "__glink",
6369 sh->root.u.def.section = htab->glink;
6370 sh->root.u.def.value = htab->glink_pltresolve;
6377 sh = elf_link_hash_lookup (&htab->elf, "__glink_PLTresolve",
6384 sh->root.u.def.section = htab->glink;
6385 sh->root.u.def.value = htab->glink->size - GLINK_PLTRESOLVE;
6395 if (htab->glink != NULL
6396 && htab->glink->size != 0
6397 && htab->glink_eh_frame != NULL
6398 && !bfd_is_abs_section (htab->glink_eh_frame->output_section)
6401 s = htab->glink_eh_frame;
6406 if (htab->glink->size - GLINK_PLTRESOLVE + 8 >= 256)
6414 for (s = htab->elf.dynobj->sections; s != NULL; s = s->next)
6421 if (s == htab->plt
6422 || s == htab->got)
6427 if (htab->elf.hplt != NULL)
6432 else if (s == htab->iplt
6433 || s == htab->glink
6434 || s == htab->glink_eh_frame
6435 || s == htab->sgotplt
6436 || s == htab->sbss
6437 || s == htab->dynbss
6438 || s == htab->dynsbss)
6442 else if (s == htab->sdata[0].section
6443 || s == htab->sdata[1].section)
6447 else if (CONST_STRNEQ (bfd_get_section_name (htab->elf.dynobj, s),
6485 s->contents = bfd_zalloc (htab->elf.dynobj, s->size);
6490 if (htab->elf.dynamic_sections_created)
6506 if (htab->plt != NULL && htab->plt->size != 0)
6515 if (htab->plt_type == PLT_NEW
6516 && htab->glink != NULL
6517 && htab->glink->size != 0)
6521 if (!htab->params->no_tls_get_addr_opt
6522 && htab->tls_get_addr != NULL
6523 && htab->tls_get_addr->plt.plist != NULL
6547 if (htab->is_vxworks
6553 if (htab->glink_eh_frame != NULL
6554 && htab->glink_eh_frame->contents != NULL)
6556 unsigned char *p = htab->glink_eh_frame->contents;
6561 bfd_put_32 (htab->elf.dynobj, sizeof (glink_eh_frame_cie) - 4, p);
6564 val = htab->glink_eh_frame->size - 4 - sizeof (glink_eh_frame_cie);
6565 bfd_put_32 (htab->elf.dynobj, val, p);
6568 val = p - htab->glink_eh_frame->contents;
6569 bfd_put_32 (htab->elf.dynobj, val, p);
6574 bfd_put_32 (htab->elf.dynobj, htab->glink->size, p);
6580 && htab->elf.dynamic_sections_created)
6582 bfd_vma adv = (htab->glink->size - GLINK_PLTRESOLVE + 8) >> 2;
6593 bfd_put_16 (htab->elf.dynobj, adv, p);
6599 bfd_put_32 (htab->elf.dynobj, adv, p);
6609 BFD_ASSERT ((bfd_vma) ((p + 3 - htab->glink_eh_frame->contents) & -4)
6610 == htab->glink_eh_frame->size);
6646 struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
6648 if (htab != NULL)
6650 maybe_strip_sdasym (info->output_bfd, &htab->sdata[0]);
6651 maybe_strip_sdasym (info->output_bfd, &htab->sdata[1]);
6730 struct ppc_elf_link_hash_table *htab;
6750 htab = ppc_elf_hash_table (link_info);
6751 if (htab == NULL)
6763 if (htab->params->ppc476_workaround)
6785 if (htab->params->branch_trampolines)
6894 && h == htab->tls_get_addr
6978 if (htab->plt_type == PLT_NEW
6980 || !htab->elf.dynamic_sections_created
6983 tsec = htab->glink;
6988 tsec = htab->plt;
7091 if (tsec == htab->plt
7092 || tsec == htab->glink)
7174 if (htab->params->ppc476_workaround
7176 || isec->output_section->alignment_power >= htab->params->pagesize_p2))
7180 bfd_vma pagesize = (bfd_vma) 1 << htab->params->pagesize_p2;
7185 crossings = ((end_addr & -pagesize) - addr) >> htab->params->pagesize_p2;
7368 struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
7384 else if (htab->elf.hgot != NULL)
7385 got = SYM_VAL (htab->elf.hgot);
7397 bfd_put_32 (output_bfd, htab->params->ppc476_workaround ? BA : NOP, p);
7577 struct ppc_elf_link_hash_table *htab;
7601 htab = ppc_elf_hash_table (info);
7607 is_vxworks_tls = (htab->is_vxworks && info->shared
7805 htab->tls_get_addr))
7838 rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
7906 rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
7963 if (!htab->is_vxworks)
7999 rela.r_offset = (htab->iplt->output_section->vma
8000 + htab->iplt->output_offset
8004 loc = htab->reliplt->contents;
8005 loc += (htab->reliplt->reloc_count++
8013 unsigned char *p = ((unsigned char *) htab->glink->contents
8015 write_glink_stub (ent, htab->iplt, p, info);
8020 if (htab->plt_type == PLT_NEW
8021 || !htab->elf.dynamic_sections_created
8024 relocation = (htab->glink->output_section->vma
8025 + htab->glink->output_offset
8028 relocation = (htab->plt->output_section->vma
8029 + htab->plt->output_offset
8104 if (htab->got == NULL)
8111 offp = &htab->tlsld_got.offset;
8115 dyn = htab->elf.dynamic_sections_created;
8151 if (offp == &htab->tlsld_got.offset)
8186 && (offp == &htab->tlsld_got.offset
8191 asection *rsec = htab->relgot;
8195 rsec = htab->reliplt;
8196 outrel.r_offset = (htab->got->output_section->vma
8197 + htab->got->output_offset
8229 outrel.r_addend -= htab->elf.tls_sec->vma;
8247 value -= htab->elf.tls_sec->vma + DTP_OFFSET;
8254 htab->got->contents + off + 4);
8259 htab->got->contents + off);
8296 relocation = (htab->got->output_section->vma
8297 + htab->got->output_offset
8299 - SYM_VAL (htab->elf.hgot));
8335 addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
8359 addend -= htab->elf.tls_sec->vma + TP_OFFSET;
8366 addend -= htab->elf.tls_sec->vma + TP_OFFSET;
8370 addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
8385 if (h == NULL || h == htab->elf.hgot)
8408 || h == htab->elf.hgot)
8456 sreloc = htab->reliplt;
8533 osec = htab->elf.text_index_section;
8587 if (htab->plt_type == PLT_NEW)
8588 relocation = (htab->glink->output_section->vma
8589 + htab->glink->output_offset
8592 relocation = (htab->plt->output_section->vma
8593 + htab->plt->output_offset
8662 BFD_ASSERT (htab->sdata[0].section != NULL);
8663 if (!is_static_defined (htab->sdata[0].sym))
8669 = elf_finish_pointer_linker_section (input_bfd, &htab->sdata[0],
8676 BFD_ASSERT (htab->sdata[1].section != NULL);
8677 if (!is_static_defined (htab->sdata[1].sym))
8683 = elf_finish_pointer_linker_section (input_bfd, &htab->sdata[1],
8712 || htab->plt == NULL)
8723 if (htab->plt_type == PLT_NEW)
8724 relocation = (htab->glink->output_section->vma
8725 + htab->glink->output_offset
8728 relocation = (htab->plt->output_section->vma
8729 + htab->plt->output_offset
8744 struct elf_link_hash_entry *sda = htab->sdata[0].sym;
8774 struct elf_link_hash_entry *sda = htab->sdata[1].sym;
8858 sda = htab->sdata[0].sym;
8864 sda = htab->sdata[1].sym;
8957 sda = htab->sdata[0].sym;
8963 sda = htab->sdata[1].sym;
9268 if (htab->params->ppc476_workaround
9272 >= htab->params->pagesize_p2)))
9276 bfd_vma pagesize = (bfd_vma) 1 << htab->params->pagesize_p2;
9512 struct ppc_elf_link_hash_table *htab;
9521 htab = ppc_elf_hash_table (info);
9522 BFD_ASSERT (htab->elf.dynobj != NULL);
9534 if (htab
9535 || !htab->elf.dynamic_sections_created
9540 reloc_index = ((ent->plt.offset - htab->plt_initial_entry_size)
9541 / htab->plt_slot_size);
9543 && htab->plt_type == PLT_OLD)
9549 if (htab->plt_type == PLT_VXWORKS
9550 && htab->elf.dynamic_sections_created
9568 htab->plt->contents + ent->plt.offset + 0);
9571 htab->plt->contents + ent->plt.offset + 4);
9575 bfd_vma got_loc = got_offset + SYM_VAL (htab->elf.hgot);
9579 htab->plt->contents + ent->plt.offset + 0);
9582 htab->plt->contents + ent->plt.offset + 4);
9586 htab->plt->contents + ent->plt.offset + 8);
9588 htab->plt->contents + ent->plt.offset + 12);
9598 htab->plt->contents + ent->plt.offset + 16);
9608 htab->plt->contents + ent->plt.offset + 20);
9610 htab->plt->contents + ent->plt.offset + 24);
9612 htab->plt->contents + ent->plt.offset + 28);
9617 bfd_put_32 (output_bfd, (htab->plt->output_section->vma
9618 + htab->plt->output_offset
9620 htab->sgotplt->contents + got_offset);
9625 loc = htab->srelplt2->contents
9631 rela.r_offset = (htab->plt->output_section->vma
9632 + htab->plt->output_offset
9634 rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx,
9641 rela.r_offset = (htab->plt->output_section->vma
9642 + htab->plt->output_offset
9644 rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx,
9652 rela.r_offset = (htab->sgotplt->output_section->vma
9653 + htab->sgotplt->output_offset
9655 rela.r_info = ELF32_R_INFO (htab->elf.hplt->indx,
9666 rela.r_offset = (htab->sgotplt->output_section->vma
9667 + htab->sgotplt->output_offset
9673 asection *splt = htab->plt;
9674 if (!htab->elf.dynamic_sections_created
9676 splt = htab->iplt;
9681 if (htab->plt_type == PLT_OLD
9682 || !htab->elf.dynamic_sections_created
9690 bfd_vma val = (htab->glink_pltresolve + ent->plt.offset
9691 + htab->glink->output_section->vma
9692 + htab->glink->output_offset);
9700 if (!htab->elf.dynamic_sections_created
9713 if (!htab->elf.dynamic_sections_created
9715 loc = (htab->reliplt->contents
9716 + (htab->reliplt->reloc_count++
9719 loc = (htab->relplt->contents
9754 (output_bfd, htab->glink->output_section));
9756 + htab->glink->output_offset
9757 + htab->glink->output_section->vma);
9762 if (htab->plt_type == PLT_NEW
9763 || !htab->elf.dynamic_sections_created
9767 asection *splt = htab->plt;
9768 if (!htab->elf.dynamic_sections_created
9770 splt = htab->iplt;
9772 p = (unsigned char *) htab->glink->contents + ent->glink_offset;
9774 if (h == htab->tls_get_addr && !htab->params->no_tls_get_addr_opt)
9819 s = htab->relsbss;
9821 s = htab->relbss;
9844 struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info);
9846 if (rel_sec == htab->reliplt)
9871 struct ppc_elf_link_hash_table *htab;
9880 htab = ppc_elf_hash_table (info);
9883 if (htab->is_vxworks)
9889 if (htab->elf.hgot != NULL)
9890 got = SYM_VAL (htab->elf.hgot);
9892 if (htab->elf.dynamic_sections_created)
9896 BFD_ASSERT (htab->plt != NULL && sdyn != NULL);
9910 if (htab->is_vxworks)
9911 s = htab->sgotplt;
9913 s = htab->plt;
9918 dyn.d_un.d_val = htab->relplt->size;
9922 s = htab->relplt;
9931 if (htab->is_vxworks)
9933 if (htab->relplt)
9934 dyn.d_un.d_ptr -= htab->relplt->size;
9940 if (htab->is_vxworks
9950 if (htab->got != NULL)
9952 if (htab->elf.hgot->root.u.def.section == htab->got
9953 || htab->elf.hgot->root.u.def.section == htab->sgotplt)
9955 unsigned char *p = htab->elf.hgot->root.u.def.section->contents;
9957 p += htab->elf.hgot->root.u.def.value;
9958 if (htab->plt_type == PLT_OLD)
9963 BFD_ASSERT (htab->elf.hgot->root.u.def.value - 4
9964 < htab->elf.hgot->root.u.def.section->size);
9971 BFD_ASSERT (htab->elf.hgot->root.u.def.value
9972 < htab->elf.hgot->root.u.def.section->size);
9979 htab->elf.hgot->root.root.string,
9980 (htab->sgotplt != NULL
9981 ? htab->sgotplt->name : htab->got->name));
9986 elf_section_data (htab->got->output_section)->this_hdr.sh_entsize = 4;
9999 bfd_vma got_value = SYM_VAL (htab->elf.hgot);
10023 loc = htab->srelplt2->contents;
10026 rela.r_offset = (htab->plt->output_section->vma
10027 + htab->plt->output_offset
10029 rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA);
10035 rela.r_offset = (htab->plt->output_section->vma
10036 + htab->plt->output_offset
10038 rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO);
10046 while (loc < htab->srelplt2->contents + htab->srelplt2->size)
10051 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA);
10056 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO);
10061 rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_PPC_ADDR32);
10068 if (htab->glink != NULL
10069 && htab->glink->contents != NULL
10070 && htab->elf.dynamic_sections_created)
10182 p = htab->glink->contents;
10183 p += htab->glink_pltresolve;
10184 endp = htab->glink->contents;
10185 endp += htab->glink->size - GLINK_PLTRESOLVE;
10186 while (p < endp - (htab->params->ppc476_workaround ? 0 : 8 * 4))
10197 res0 = (htab->glink_pltresolve
10198 + htab->glink->output_section->vma
10199 + htab->glink->output_offset);
10201 if (htab->params->ppc476_workaround)
10206 bfd_vma pagesize = (bfd_vma) 1 << htab->params->pagesize_p2;
10208 bfd_vma glink_start = (htab->glink->output_section->vma
10209 + htab->glink->output_offset);
10219 loc = htab->glink->contents + page_addr - 4 - glink_start;
10243 if (htab->params->ppc476_workaround && insn == NOP)
10250 bcl = (htab->glink->size - GLINK_PLTRESOLVE + 3*4
10251 + htab->glink->output_section->vma
10252 + htab->glink->output_offset);
10281 if (htab->params->ppc476_workaround && insn == NOP)
10311 if (htab->glink_eh_frame != NULL
10312 && htab->glink_eh_frame->contents != NULL)
10314 unsigned char *p = htab->glink_eh_frame->contents;
10323 val = (htab->glink->output_section->vma
10324 + htab->glink->output_offset);
10325 val -= (htab->glink_eh_frame->output_section->vma
10326 + htab->glink_eh_frame->output_offset);
10327 val -= p - htab->glink_eh_frame->contents;
10328 bfd_put_32 (htab->elf.dynobj, val, p);
10330 if (htab->glink_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME
10332 htab->glink_eh_frame,
10333 htab->glink_eh_frame->contents))
10466 struct ppc_elf_link_hash_table *htab
10468 htab->is_vxworks = 1;
10469 htab->plt_type = PLT_VXWORKS;
10470 htab->plt_entry_size = VXWORKS_PLT_ENTRY_SIZE;
10471 htab->plt_slot_size = VXWORKS_PLT_ENTRY_SIZE;
10472 htab->plt_initial_entry_size = VXWORKS_PLT_INITIAL_ENTRY_SIZE;