Home | History | Annotate | Download | only in bfd

Lines Matching full:htab

2580   struct elf_sh_link_hash_table *htab = sh_elf_hash_table (info);
2583 if (!htab->fdpic_p)
2610 struct elf_sh_link_hash_table *htab;
2615 htab = sh_elf_hash_table (info);
2616 if (htab == NULL)
2619 htab->sgot = bfd_get_linker_section (dynobj, ".got");
2620 htab->sgotplt = bfd_get_linker_section (dynobj, ".got.plt");
2621 htab->srelgot = bfd_get_linker_section (dynobj, ".rela.got");
2622 if (! htab->sgot || ! htab->sgotplt || ! htab->srelgot)
2625 htab->sfuncdesc = bfd_make_section_anyway_with_flags (dynobj, ".got.funcdesc",
2630 if (htab->sfuncdesc == NULL
2631 || ! bfd_set_section_alignment (dynobj, htab->sfuncdesc, 2))
2634 htab->srelfuncdesc = bfd_make_section_anyway_with_flags (dynobj,
2641 if (htab->srelfuncdesc == NULL
2642 || ! bfd_set_section_alignment (dynobj, htab->srelfuncdesc, 2))
2646 htab->srofixup = bfd_make_section_anyway_with_flags (dynobj, ".rofixup",
2652 if (htab->srofixup == NULL
2653 || ! bfd_set_section_alignment (dynobj, htab->srofixup, 2))
2664 struct elf_sh_link_hash_table *htab;
2685 htab = sh_elf_hash_table (info);
2686 if (htab == NULL)
2689 if (htab->root.dynamic_sections_created)
2706 htab->splt = s;
2727 htab->root.hplt = h;
2738 htab->srelplt = s;
2743 if (htab->sgot == NULL
2757 htab->sdynbss = s;
2778 htab->srelbss = s;
2785 if (htab->vxworks_p)
2787 if (!elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2))
2805 struct elf_sh_link_hash_table *htab;
2810 htab = sh_elf_hash_table (info);
2811 if (htab == NULL)
2815 BFD_ASSERT (htab->root.dynobj != NULL
2910 s = htab->sdynbss;
2921 srel = htab->srelbss;
2937 struct elf_sh_link_hash_table *htab;
2945 htab = sh_elf_hash_table (info);
2946 if (htab == NULL)
2961 if (htab->root.dynamic_sections_created
2978 asection *s = htab->splt;
2984 s->size += htab->plt_info->plt0_entry_size;
2995 if (!htab->fdpic_p && !info->shared && !h->def_regular)
3002 plt_info = htab->plt_info;
3010 if (!htab->fdpic_p)
3011 htab->sgotplt->size += 4;
3013 htab->sgotplt->size += 8;
3016 htab->srelplt->size += sizeof (Elf32_External_Rela);
3018 if (htab->vxworks_p && !info->shared)
3026 if (h->plt.offset == htab->plt_info->plt0_entry_size)
3027 htab->srelplt2->size += sizeof (Elf32_External_Rela);
3032 htab->srelplt2->size += sizeof (Elf32_External_Rela) * 2;
3062 s = htab->sgot;
3068 dyn = htab->root.dynamic_sections_created;
3072 if (htab->fdpic_p && !info->shared
3075 htab->srofixup->size += 4;
3084 htab->srelgot->size += sizeof (Elf32_External_Rela);
3086 htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
3090 htab->srofixup->size += 4;
3092 htab->srelgot->size += sizeof (Elf32_External_Rela);
3098 htab->srelgot->size += sizeof (Elf32_External_Rela);
3099 else if (htab->fdpic_p && !info->shared && got_type == GOT_NORMAL
3102 htab->srofixup->size += 4;
3122 s = htab->sgot;
3125 dyn = htab->root.dynamic_sections_created;
3127 htab->srelgot->size += sizeof (Elf32_External_Rela);
3140 || (htab->root.dynamic_sections_created
3144 htab->srofixup->size += eh->abs_funcdesc_refcount * 4;
3146 htab->srelgot->size
3162 eh->funcdesc.offset = htab->sfuncdesc->size;
3163 htab->sfuncdesc->size += 8;
3168 htab->srofixup->size += 8;
3170 htab->srelfuncdesc->size += sizeof (Elf32_External_Rela);
3199 if (htab->vxworks_p)
3239 || (htab->root.dynamic_sections_created
3270 if (htab->fdpic_p && !info->shared)
3271 htab->srofixup->size -= 4 * (p->count - p->pc_count);
3325 struct elf_sh_link_hash_table *htab;
3331 htab = sh_elf_hash_table (info);
3332 if (htab == NULL)
3335 dynobj = htab->root.dynobj;
3338 if (htab->root.dynamic_sections_created)
3382 else if (htab->vxworks_p
3397 if (htab->fdpic_p && !info->shared)
3398 htab->srofixup->size -= 4 * (p->count - p->pc_count);
3409 s = htab->sgot;
3410 srel = htab->srelgot;
3429 htab->srofixup->size += 4;
3465 local_funcdesc->offset = htab->sfuncdesc->size;
3466 htab->sfuncdesc->size += 8;
3468 htab->srofixup->size += 8;
3470 htab->srelfuncdesc->size += sizeof (Elf32_External_Rela);
3479 if (htab->tls_ldm_got.refcount > 0)
3483 htab->tls_ldm_got.offset = htab->sgot->size;
3484 htab->sgot->size += 8;
3485 htab->srelgot->size += sizeof (Elf32_External_Rela);
3488 htab->tls_ldm_got.offset = -1;
3492 if (htab->fdpic_p)
3494 BFD_ASSERT (htab->sgotplt && htab->sgotplt->size == 12);
3495 htab->sgotplt->size = 0;
3500 elf_link_hash_traverse (&htab->root, allocate_dynrelocs, info);
3504 if (htab->fdpic_p)
3506 htab->root.hgot->root.u.def.value = htab->sgotplt->size;
3507 htab->sgotplt->size += 12;
3511 if (htab->fdpic_p && htab->srofixup != NULL)
3512 htab->srofixup->size += 4;
3522 if (s == htab->splt
3523 || s == htab->sgot
3524 || s == htab->sgotplt
3525 || s == htab->sfuncdesc
3526 || s == htab->srofixup
3527 || s == htab->sdynbss)
3534 if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2)
3576 if (htab->root.dynamic_sections_created)
3592 if (htab->splt->size != 0)
3601 && htab->sgot->size != 0)
3618 elf_link_hash_traverse (&htab->root, readonly_dynrelocs, info);
3626 if (htab->vxworks_p
3674 sh_elf_got_offset (struct elf_sh_link_hash_table *htab)
3676 return (htab->sgot->output_offset - htab->sgotplt->output_offset
3677 - htab->root.hgot->root.u.def.value);
3718 struct elf_sh_link_hash_table *htab;
3722 htab = sh_elf_hash_table (info);
3751 sh_elf_add_rofixup (output_bfd, htab->srofixup,
3753 + htab->sfuncdesc->output_section->vma
3754 + htab->sfuncdesc->output_offset);
3755 sh_elf_add_rofixup (output_bfd, htab->srofixup,
3757 + htab->sfuncdesc->output_section->vma
3758 + htab->sfuncdesc->output_offset);
3764 seg = htab->root.hgot->root.u.def.value
3765 + htab->root.hgot->root.u.def.section->output_section->vma
3766 + htab->root.hgot->root.u.def.section->output_offset;
3769 sh_elf_add_dyn_reloc (output_bfd, htab->srelfuncdesc,
3771 + htab->sfuncdesc->output_section->vma
3772 + htab->sfuncdesc->output_offset,
3775 bfd_put_32 (output_bfd, addr, htab->sfuncdesc->contents + offset);
3776 bfd_put_32 (output_bfd, seg, htab->sfuncdesc->contents + offset + 4);
3819 struct elf_sh_link_hash_table *htab;
3836 htab = sh_elf_hash_table (info);
3837 if (htab != NULL)
3839 dynobj = htab->root.dynobj;
3840 sgot = htab->sgot;
3841 sgotplt = htab->sgotplt;
3842 splt = htab->splt;
3843 fdpic_p = htab->fdpic_p;
3864 is_vxworks_tls = (htab && htab->vxworks_p && info->shared
4042 dyn = htab ? htab->root.dynamic_sections_created : FALSE;
4413 BFD_ASSERT (htab);
4430 sh_elf_add_rofixup (output_bfd, htab->srofixup,
4469 BFD_ASSERT (htab);
4472 + (get_plt_index (htab->plt_info, h->plt.offset)
4495 BFD_ASSERT (htab);
4515 dyn = htab->root.dynamic_sections_created;
4558 sh_elf_add_rofixup (output_bfd, htab->srofixup,
4565 relocation = sh_elf_got_offset (htab) + off;
4635 sh_elf_add_rofixup (output_bfd, htab->srofixup,
4648 relocation = sh_elf_got_offset (htab) + off;
4677 BFD_ASSERT (htab);
4681 + htab->root.hgot->root.u.def.value;
4778 BFD_ASSERT (htab);
4817 || !htab->root.dynamic_sections_created))
4852 dynindx = elf_section_data (htab->sfuncdesc
4884 relocation = htab->sfuncdesc->output_offset + (offset & ~1);
4907 sh_elf_add_rofixup (output_bfd, htab->srofixup,
4956 relocation += htab->sfuncdesc->output_section->vma;
4969 relocation = sh_elf_got_offset (htab) + reloc_offset;
4992 BFD_ASSERT (htab);
5042 relocation = htab->sfuncdesc->output_offset + (offset & ~1);
5045 relocation -= (htab->root.hgot->root.u.def.value
5081 BFD_ASSERT (htab);
5199 && ! htab->root.dynamic_sections_created)
5204 bfd_put_32 (output_bfd, sh_elf_got_offset (htab) + off,
5272 relocation = sh_elf_got_offset (htab) + off;
5321 bfd_put_32 (output_bfd, sh_elf_got_offset (htab) + off,
5332 BFD_ASSERT (htab);
5384 off = htab->tls_ldm_got.offset;
5392 srelgot = htab->srelgot;
5403 htab->tls_ldm_got.offset |= 1;
5406 relocation = sh_elf_got_offset (htab) + off;
5997 struct elf_sh_link_hash_table *htab;
6014 htab = sh_elf_hash_table (info);
6015 if (htab == NULL)
6059 if (htab->fdpic_p)
6084 if (htab->sgot == NULL)
6090 if (!htab->fdpic_p)
6128 if (htab->root.dynobj == NULL)
6129 htab->root.dynobj = abfd;
6130 if (!create_got_section (htab->root.dynobj, info))
6328 htab->srofixup->size += 4;
6330 htab->srelgot->size += sizeof (Elf32_External_Rela);
6456 if (htab->root.dynobj == NULL)
6457 htab->root.dynobj = abfd;
6465 (sec, htab->root.dynobj, 2, abfd, /*rela?*/ TRUE);
6482 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
6499 p = bfd_alloc (htab->root.dynobj, amt);
6524 if (htab->fdpic_p && !info->shared
6527 htab->srofixup->size += 4;
6692 struct elf_sh_link_hash_table *htab;
6694 htab = sh_elf_hash_table (info);
6695 if (htab == NULL)
6715 splt = htab->splt;
6716 sgotplt = htab->sgotplt;
6717 srelplt = htab->srelplt;
6724 plt_index = get_plt_index (htab->plt_info, h->plt.offset);
6726 plt_info = htab->plt_info;
6732 if (htab->fdpic_p)
6752 if (info->shared || htab->fdpic_p)
6780 if (htab->vxworks_p)
6824 if (htab->fdpic_p)
6841 if (htab->fdpic_p)
6844 htab->splt->output_section),
6851 if (htab->fdpic_p)
6862 if (htab->vxworks_p && !info->shared)
6866 loc = (htab->srelplt2->contents
6871 rel.r_offset = (htab->splt->output_section->vma
6872 + htab->splt->output_offset
6875 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_SH_DIR32);
6885 rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_SH_DIR32);
6911 sgot = htab->sgot;
6912 srelgot = htab->srelgot;
6927 if (htab->fdpic_p)
6972 sgot = htab->sgot;
6973 srelgot = htab->srelgot;
6988 if (htab->fdpic_p)
7033 s = bfd_get_linker_section (htab->root.dynobj, ".rela.bss");
7048 if (h == htab->root.hdynamic
7049 || (!htab->vxworks_p && h == htab->root.hgot))
7060 struct elf_sh_link_hash_table *htab;
7064 htab = sh_elf_hash_table (info);
7065 if (htab == NULL)
7068 sgotplt = htab->sgotplt;
7069 sdyn = bfd_get_linker_section (htab->root.dynobj, ".dynamic");
7071 if (htab->root.dynamic_sections_created)
7088 bfd_elf32_swap_dyn_in (htab->root.dynobj, dyncon, &dyn);
7093 if (htab->vxworks_p
7110 h = elf_link_hash_lookup (&htab->root, name,
7122 BFD_ASSERT (htab->root.hgot != NULL);
7123 s = htab->root.hgot->root.u.def.section;
7124 dyn.d_un.d_ptr = htab->root.hgot->root.u.def.value
7130 s = htab->srelplt->output_section;
7137 s = htab->srelplt->output_section;
7153 if (htab->srelplt != NULL)
7155 s = htab->srelplt->output_section;
7164 splt = htab->splt;
7165 if (splt && splt->size > 0 && htab->plt_info->plt0_entry)
7170 htab->plt_info->plt0_entry,
7171 htab->plt_info->plt0_entry_size);
7172 for (i = 0; i < ARRAY_SIZE (htab->plt_info->plt0_got_fields); i++)
7173 if (htab->plt_info->plt0_got_fields[i] != MINUS_ONE)
7179 + htab->plt_info->plt0_got_fields[i]));
7181 if (htab->vxworks_p)
7189 loc = htab->srelplt2->contents;
7192 + htab->plt_info->plt0_got_fields[2]);
7193 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_SH_DIR32);
7202 while (loc < htab->srelplt2->contents + htab->srelplt2->size)
7206 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx,
7213 rel.r_info = ELF32_R_INFO (htab->root.hplt->indx,
7227 if (sgotplt && sgotplt->size > 0 && !htab->fdpic_p)
7243 if (htab->fdpic_p && htab->srofixup != NULL)
7245 struct elf_link_hash_entry *hgot = htab->root.hgot;
7250 sh_elf_add_rofixup (output_bfd, htab->srofixup, got_value);
7253 BFD_ASSERT (htab->srofixup->reloc_count * 4 == htab->srofixup->size);
7256 if (htab->srelfuncdesc)
7257 BFD_ASSERT (htab->srelfuncdesc->reloc_count * sizeof (Elf32_External_Rela)
7258 == htab->srelfuncdesc->size);
7260 if (htab->srelgot)
7261 BFD_ASSERT (htab->srelgot->reloc_count * sizeof (Elf32_External_Rela)
7262 == htab->srelgot->size);
7371 struct elf_sh_link_hash_table *htab = sh_elf_hash_table (info);
7374 if (htab->fdpic_p)
7389 struct elf_sh_link_hash_table *htab = sh_elf_hash_table (info);
7392 if (!htab->fdpic_p)
7396 h = htab->root.hgot;