Home | History | Annotate | Download | only in bfd

Lines Matching refs:htab

541    Will be padded to PLT_ENTRY_SIZE with htab->plt0_pad_byte.  */
565 Will be padded to PLT_ENTRY_SIZE with htab->plt0_pad_byte. */
831 #define elf_i386_compute_jump_table_size(htab) \
832 ((htab)->elf.srelplt->reloc_count * 4)
895 elf_i386_get_local_sym_hash (struct elf_i386_link_hash_table *htab,
907 slot = htab_find_slot_with_hash (htab->loc_hash_table, &e, h,
920 objalloc_alloc ((struct objalloc *) htab->loc_hash_memory,
938 struct elf_i386_link_hash_table *htab
941 if (htab->loc_hash_table)
942 htab_delete (htab->loc_hash_table);
943 if (htab->loc_hash_memory)
944 objalloc_free ((struct objalloc *) htab->loc_hash_memory);
991 struct elf_i386_link_hash_table *htab;
996 htab = elf_i386_hash_table (info);
997 if (htab == NULL)
1000 htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
1002 htab->srelbss = bfd_get_linker_section (dynobj, ".rel.bss");
1004 if (!htab->sdynbss
1005 || (!info->shared && !htab->srelbss))
1010 &htab->srelplt2))
1014 && htab->plt_eh_frame == NULL
1015 && htab->elf.splt != NULL)
1020 htab->plt_eh_frame
1022 if (htab->plt_eh_frame == NULL
1023 || !bfd_set_section_alignment (dynobj, htab->plt_eh_frame, 2))
1380 struct elf_i386_link_hash_table *htab;
1382 htab = elf_i386_hash_table (info);
1383 if (htab == NULL)
1389 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
1418 struct elf_i386_link_hash_table *htab;
1430 htab = elf_i386_hash_table (info);
1431 if (htab == NULL)
1463 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
1471 h = elf_i386_get_local_sym_hash (htab, abfd, rel, TRUE);
1510 if (htab->elf.dynobj == NULL)
1511 htab->elf.dynobj = abfd;
1512 if (!_bfd_elf_create_ifunc_sections (htab->elf.dynobj, info))
1531 htab->tls_ldm_got.refcount += 1;
1665 if (htab->elf.sgot == NULL)
1667 if (htab->elf.dynobj == NULL)
1668 htab->elf.dynobj = abfd;
1669 if (!_bfd_elf_create_got_section (htab->elf.dynobj, info))
1747 if (htab->elf.dynobj == NULL)
1748 htab->elf.dynobj = abfd;
1751 (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ FALSE);
1771 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
1788 p = (struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj,
1859 struct elf_i386_link_hash_table *htab;
1868 htab = elf_i386_hash_table (info);
1869 if (htab == NULL)
1898 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
1905 h = elf_i386_get_local_sym_hash (htab, abfd, rel, FALSE);
1937 if (htab->tls_ldm_got.refcount > 0)
1938 htab->tls_ldm_got.refcount -= 1;
2009 struct elf_i386_link_hash_table *htab;
2123 htab = elf_i386_hash_table (info);
2124 if (htab == NULL)
2164 htab->srelbss->size += sizeof (Elf32_External_Rel);
2168 s = htab->sdynbss;
2180 struct elf_i386_link_hash_table *htab;
2191 htab = elf_i386_hash_table (info);
2192 if (htab == NULL)
2204 htab->elf.dynamic_sections_created
2219 asection *s = htab->elf.splt;
2245 htab->elf.sgotplt->size += 4;
2248 htab->elf.srelplt->size += sizeof (Elf32_External_Rel);
2249 htab->elf.srelplt->reloc_count++;
2263 htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
2269 htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
2308 s = htab->elf.sgot;
2311 eh->tlsdesc_got = htab->elf.sgotplt->size
2312 - elf_i386_compute_jump_table_size (htab);
2313 htab->elf.sgotplt->size += 8;
2325 dyn = htab->elf.dynamic_sections_created;
2332 htab->elf.srelgot->size += 2 * sizeof (Elf32_External_Rel);
2335 htab->elf.srelgot->size += sizeof (Elf32_External_Rel);
2337 htab->elf.srelgot->size += 2 * sizeof (Elf32_External_Rel);
2343 htab->elf.srelgot->size += sizeof (Elf32_External_Rel);
2345 htab->elf.srelplt->size += sizeof (Elf32_External_Rel);
2421 || (htab->elf.dynamic_sections_created
2527 struct elf_i386_link_hash_table *htab;
2551 htab = elf_i386_hash_table (link_info);
2581 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
2614 && h != htab->elf.hdynamic
2667 struct elf_i386_link_hash_table *htab;
2673 htab = elf_i386_hash_table (info);
2674 if (htab == NULL)
2676 dynobj = htab->elf.dynobj;
2680 if (htab->elf.dynamic_sections_created)
2760 s = htab->elf.sgot;
2761 srel = htab->elf.srelgot;
2770 *local_tlsdesc_gotent = htab->elf.sgotplt->size
2771 - elf_i386_compute_jump_table_size (htab);
2772 htab->elf.sgotplt->size += 8;
2794 htab->elf.srelplt->size += sizeof (Elf32_External_Rel);
2802 if (htab->tls_ldm_got.refcount > 0)
2806 htab->tls_ldm_got.offset = htab->elf.sgot->size;
2807 htab->elf.sgot->size += 8;
2808 htab->elf.srelgot->size += sizeof (Elf32_External_Rel);
2811 htab->tls_ldm_got.offset = -1;
2815 elf_link_hash_traverse (&htab->elf, elf_i386_allocate_dynrelocs, info);
2818 htab_traverse (htab->loc_hash_table,
2830 if (htab->elf.srelplt)
2832 htab->next_tls_desc_index = htab->elf.srelplt->reloc_count;
2833 htab->sgotplt_jump_table_size = htab->next_tls_desc_index * 4;
2834 htab->next_irelative_index = htab->elf.srelplt->reloc_count - 1;
2836 else if (htab->elf.irelplt)
2837 htab->next_irelative_index = htab->elf.irelplt->reloc_count - 1;
2840 if (htab->elf.sgotplt)
2844 if ((htab->elf.hgot == NULL
2845 || !htab->elf.hgot->ref_regular_nonweak)
2846 && (htab->elf.sgotplt->size
2848 && (htab->elf.splt == NULL
2849 || htab->elf.splt->size == 0)
2850 && (htab->elf.sgot == NULL
2851 || htab->elf.sgot->size == 0)
2852 && (htab->elf.iplt == NULL
2853 || htab->elf.iplt->size == 0)
2854 && (htab->elf.igotplt == NULL
2855 || htab->elf.igotplt->size == 0))
2856 htab->elf.sgotplt->size = 0;
2860 if (htab->plt_eh_frame != NULL
2861 && htab->elf.splt != NULL
2862 && htab->elf.splt->size != 0
2863 && !bfd_is_abs_section (htab->elf.splt->output_section)
2865 htab->plt_eh_frame->size = sizeof (elf_i386_eh_frame_plt);
2877 if (s == htab->elf.splt
2878 || s == htab->elf.sgot)
2886 if (htab->elf.hplt != NULL)
2889 else if (s == htab->elf.sgotplt
2890 || s == htab->elf.iplt
2891 || s == htab->elf.igotplt
2892 || s == htab->plt_eh_frame
2893 || s == htab->sdynbss)
2900 && s != htab->elf.srelplt
2901 && s != htab->srelplt2)
2943 if (htab->plt_eh_frame != NULL
2944 && htab->plt_eh_frame->contents != NULL)
2946 memcpy (htab->plt_eh_frame->contents, elf_i386_eh_frame_plt,
2948 bfd_put_32 (dynobj, htab->elf.splt->size,
2949 htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET);
2952 if (htab->elf.dynamic_sections_created)
2968 if (htab->elf.splt->size != 0)
2987 elf_link_hash_traverse (&htab->elf,
3021 struct elf_i386_link_hash_table *htab;
3026 htab = elf_i386_hash_table (info);
3027 if (htab == NULL)
3036 htab->tls_module_base = bh;
3090 struct elf_i386_link_hash_table *htab;
3096 htab = elf_i386_hash_table (info);
3097 if (htab == NULL)
3100 base = htab->tls_module_base;
3104 base->u.def.value = htab->elf.tls_size;
3126 struct elf_link_hash_table *htab = elf_hash_table (info);
3131 if (htab->tls_sec == NULL)
3135 static_tls_size = BFD_ALIGN (htab->tls_size, bed->static_tls_alignment);
3136 return static_tls_size + htab->tls_sec->vma - address;
3151 struct elf_i386_link_hash_table *htab;
3163 htab = elf_i386_hash_table (info);
3164 if (htab == NULL)
3305 h = elf_i386_get_local_sym_hash (htab, input_bfd, rel,
3349 if (htab->elf.splt != NULL)
3351 plt = htab->elf.splt;
3352 gotplt = htab->elf.sgotplt;
3356 plt = htab->elf.iplt;
3357 gotplt = htab->elf.igotplt;
3417 sreloc = htab->elf.irelifunc;
3433 base_got = htab->elf.sgot;
3445 if (htab->elf.splt != NULL)
3449 base_got = htab->elf.sgotplt;
3455 base_got = htab->elf.igotplt;
3484 if (htab->elf.splt == NULL)
3494 if (htab->elf.splt == NULL)
3512 if (htab->elf.sgot == NULL)
3520 dyn = htab->elf.dynamic_sections_created;
3544 htab->elf.sgot->contents + off);
3566 htab->elf.sgot->contents + off);
3573 s = htab->elf.srelgot;
3577 outrel.r_offset = (htab->elf.sgot->output_section->vma
3578 + htab->elf.sgot->output_offset
3591 relocation = htab->elf.sgot->output_section->vma
3592 + htab->elf.sgot->output_offset + off
3593 - htab->elf.sgotplt->output_section->vma
3594 - htab->elf.sgotplt->output_offset;
3651 relocation -= htab->elf.sgotplt->output_section->vma
3652 + htab->elf.sgotplt->output_offset;
3657 relocation = htab->elf.sgotplt->output_section->vma
3658 + htab->elf.sgotplt->output_offset;
3672 || htab->elf.splt == NULL)
3680 relocation = (htab->elf.splt->output_section->vma
3681 + htab->elf.splt->output_offset
3986 if (htab->elf.sgot == NULL)
4011 if (htab->elf.srelgot == NULL)
4020 BFD_ASSERT (htab->sgotplt_jump_table_size + offplt + 8
4021 <= htab->elf.sgotplt->size);
4022 outrel.r_offset = (htab->elf.sgotplt->output_section->vma
4023 + htab->elf.sgotplt->output_offset
4025 + htab->sgotplt_jump_table_size);
4026 sreloc = htab->elf.srelplt;
4028 loc += (htab->next_tls_desc_index++
4038 htab->elf.sgotplt->contents + offplt
4039 + htab->sgotplt_jump_table_size + 4);
4044 htab->elf.sgotplt->contents + offplt
4045 + htab->sgotplt_jump_table_size + 4);
4049 sreloc = htab->elf.srelgot;
4051 outrel.r_offset = (htab->elf.sgot->output_section->vma
4052 + htab->elf.sgot->output_offset + off);
4066 htab->elf.sgot->contents + off);
4070 htab->elf.sgot->contents + off);
4073 htab->elf.sgot->contents + off);
4085 htab->elf.sgot->contents + off + 4);
4090 htab->elf.sgot->contents + off + 4);
4103 htab->elf.sgot->contents + off + 4);
4122 relocation = htab->sgotplt_jump_table_size + offplt;
4127 bfd_vma g_o_t = htab->elf.sgotplt->output_section->vma
4128 + htab->elf.sgotplt->output_offset;
4129 relocation = htab->elf.sgot->output_section->vma
4130 + htab->elf.sgot->output_offset + off - g_o_t;
4172 htab->elf.sgot->output_section->vma
4173 + htab->elf.sgot->output_offset + off
4174 - htab->elf.sgotplt->output_section->vma
4175 - htab->elf.sgotplt->output_offset,
4213 htab->elf.sgot->output_section->vma
4214 + htab->elf.sgot->output_offset + off
4215 - htab->elf.sgotplt->output_section->vma
4216 - htab->elf.sgotplt->output_offset,
4279 if (htab->elf.sgot == NULL)
4282 off = htab->tls_ldm_got.offset;
4289 if (htab->elf.srelgot == NULL)
4292 outrel.r_offset = (htab->elf.sgot->output_section->vma
4293 + htab->elf.sgot->output_offset + off);
4296 htab->elf.sgot->contents + off);
4298 htab->elf.sgot->contents + off + 4);
4300 elf_append_rel (output_bfd, htab->elf.srelgot, &outrel);
4301 htab->tls_ldm_got.offset |= 1;
4303 relocation = htab->elf.sgot->output_section->vma
4304 + htab->elf.sgot->output_offset + off
4305 - htab->elf.sgotplt->output_section->vma
4306 - htab->elf.sgotplt->output_offset;
4430 struct elf_i386_link_hash_table *htab;
4434 htab = elf_i386_hash_table (info);
4435 if (htab == NULL)
4451 if (htab->elf.splt != NULL)
4453 plt = htab->elf.splt;
4454 gotplt = htab->elf.sgotplt;
4455 relplt = htab->elf.srelplt;
4459 plt = htab->elf.iplt;
4460 gotplt = htab->elf.igotplt;
4461 relplt = htab->elf.irelplt;
4487 if (plt == htab->elf.splt)
4528 loc = (htab->srelplt2->contents + reloc_index
4531 rel.r_offset = (htab->elf.splt->output_section->vma
4532 + htab->elf.splt->output_offset
4534 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
4539 rel.r_offset = (htab->elf.sgotplt->output_section->vma
4540 + htab->elf.sgotplt->output_offset
4542 rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32);
4584 plt_index = htab->next_irelative_index--;
4589 plt_index = htab->next_jump_slot_index++;
4595 if (plt == htab->elf.splt)
4631 if (htab->elf.sgot == NULL || htab->elf.srelgot == NULL)
4634 rel.r_offset = (htab->elf.sgot->output_section->vma
4635 + htab->elf.sgot->output_offset
4661 plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt;
4665 htab->elf.sgot->contents + h->got.offset);
4680 htab->elf.sgot->contents + h->got.offset);
4684 elf_append_rel (output_bfd, htab->elf.srelgot, &rel);
4696 || htab->srelbss == NULL)
4703 elf_append_rel (output_bfd, htab->srelbss, &rel);
4751 struct elf_i386_link_hash_table *htab;
4756 htab = elf_i386_hash_table (info);
4757 if (htab == NULL)
4760 dynobj = htab->elf.dynobj;
4764 if (htab->elf.dynamic_sections_created)
4768 if (sdyn == NULL || htab->elf.sgot == NULL)
4789 s = htab->elf.sgotplt;
4794 s = htab->elf.srelplt;
4799 s = htab->elf.srelplt;
4810 s = htab->elf.srelplt;
4820 s = htab->elf.srelplt;
4833 if (htab->elf.splt && htab->elf.splt->size > 0)
4837 memcpy (htab->elf.splt->contents, abed->plt->pic_plt0_entry,
4839 memset (htab->elf.splt->contents + abed->plt->plt0_entry_size,
4845 memcpy (htab->elf.splt->contents, abed->plt->plt0_entry,
4847 memset (htab->elf.splt->contents + abed->plt->plt0_entry_size,
4851 (htab->elf.sgotplt->output_section->vma
4852 + htab->elf.sgotplt->output_offset
4854 htab->elf.splt->contents
4857 (htab->elf.sgotplt->output_section->vma
4858 + htab->elf.sgotplt->output_offset
4860 htab->elf.splt->contents
4870 rel.r_offset = (htab->elf.splt->output_section->vma
4871 + htab->elf.splt->output_offset
4873 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
4875 htab->srelplt2->contents);
4877 rel.r_offset = (htab->elf.splt->output_section->vma
4878 + htab->elf.splt->output_offset
4880 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
4882 htab->srelplt2->contents +
4889 elf_section_data (htab->elf.splt->output_section)
4895 int num_plts = (htab->elf.splt->size
4899 p = htab->srelplt2->contents;
4909 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
4914 rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32);
4922 if (htab->elf.sgotplt)
4924 if (bfd_is_abs_section (htab->elf.sgotplt->output_section))
4927 (_("discarded output section: `%A'"), htab->elf.sgotplt);
4932 if (htab->elf.sgotplt->size > 0)
4937 htab->elf.sgotplt->contents);
4938 bfd_put_32 (output_bfd, 0, htab->elf.sgotplt->contents + 4);
4939 bfd_put_32 (output_bfd, 0, htab->elf.sgotplt->contents + 8);
4942 elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize = 4;
4946 if (htab->plt_eh_frame != NULL
4947 && htab->plt_eh_frame->contents != NULL)
4949 if (htab->elf.splt != NULL
4950 && htab->elf.splt->size != 0
4951 && (htab->elf.splt->flags & SEC_EXCLUDE) == 0
4952 && htab->elf.splt->output_section != NULL
4953 && htab->plt_eh_frame->output_section != NULL)
4955 bfd_vma plt_start = htab->elf.splt->output_section->vma;
4956 bfd_vma eh_frame_start = htab->plt_eh_frame->output_section->vma
4957 + htab->plt_eh_frame->output_offset
4960 htab->plt_eh_frame->contents
4963 if (htab->plt_eh_frame->sec_info_type
4967 htab->plt_eh_frame,
4968 htab->plt_eh_frame->contents))
4973 if (htab->elf.sgot && htab->elf.sgot->size > 0)
4974 elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4;
4977 htab_traverse (htab->loc_hash_table,