Lines Matching refs:htab

514    Will be padded to PLT_ENTRY_SIZE with htab->plt0_pad_byte.  */
538 Will be padded to PLT_ENTRY_SIZE with htab->plt0_pad_byte. */
696 #define elf_i386_compute_jump_table_size(htab) \
697 ((htab)->next_tls_desc_index * 4)
774 struct elf_i386_link_hash_table *htab;
779 htab = elf_i386_hash_table (info);
780 htab->sgot = bfd_get_section_by_name (dynobj, ".got");
781 htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
782 if (!htab->sgot || !htab->sgotplt)
785 htab->srelgot = bfd_make_section_with_flags (dynobj, ".rel.got",
791 if (htab->srelgot == NULL
792 || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
804 struct elf_i386_link_hash_table *htab;
806 htab = elf_i386_hash_table (info);
807 if (!htab->sgot && !create_got_section (dynobj, info))
813 htab->splt = bfd_get_section_by_name (dynobj, ".plt");
814 htab->srelplt = bfd_get_section_by_name (dynobj, ".rel.plt");
815 htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
817 htab->srelbss = bfd_get_section_by_name (dynobj, ".rel.bss");
819 if (!htab->splt || !htab->srelplt || !htab->sdynbss
820 || (!info->shared && !htab->srelbss))
823 if (htab->is_vxworks
824 && !elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2))
934 struct elf_i386_link_hash_table *htab;
944 htab = elf_i386_hash_table (info);
983 htab->tls_ldm_got.refcount += 1;
1107 if (htab->sgot == NULL)
1109 if (htab->elf.dynobj == NULL)
1110 htab->elf.dynobj = abfd;
1111 if (!create_got_section (htab->elf.dynobj, info))
1205 if (htab->elf.dynobj == NULL)
1206 htab->elf.dynobj = abfd;
1208 dynobj = htab->elf.dynobj;
1242 s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
1255 p = bfd_alloc (htab->elf.dynobj, amt);
1422 struct elf_i386_link_hash_table *htab;
1491 htab = elf_i386_hash_table (info);
1497 if (ELIMINATE_COPY_RELOCS && !htab->is_vxworks)
1539 htab->srelbss->size += sizeof (Elf32_External_Rel);
1543 s = htab->sdynbss;
1555 struct elf_i386_link_hash_table *htab;
1569 htab = elf_i386_hash_table (info);
1571 if (htab->elf.dynamic_sections_created
1586 asection *s = htab->splt;
1612 htab->sgotplt->size += 4;
1615 htab->srelplt->size += sizeof (Elf32_External_Rel);
1616 htab->next_tls_desc_index++;
1618 if (htab->is_vxworks && !info->shared)
1629 htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
1635 htab->srelplt2->size += (sizeof (Elf32_External_Rel) * 2);
1675 s = htab->sgot;
1678 eh->tlsdesc_got = htab->sgotplt->size
1679 - elf_i386_compute_jump_table_size (htab);
1680 htab->sgotplt->size += 8;
1692 dyn = htab->elf.dynamic_sections_created;
1699 htab->srelgot->size += 2 * sizeof (Elf32_External_Rel);
1702 htab->srelgot->size += sizeof (Elf32_External_Rel);
1704 htab->srelgot->size += 2 * sizeof (Elf32_External_Rel);
1710 htab->srelgot->size += sizeof (Elf32_External_Rel);
1712 htab->srelplt->size += sizeof (Elf32_External_Rel);
1776 || (htab->elf.dynamic_sections_created
1845 struct elf_i386_link_hash_table *htab;
1851 htab = elf_i386_hash_table (info);
1852 dynobj = htab->elf.dynobj;
1856 if (htab->elf.dynamic_sections_created)
1920 s = htab->sgot;
1921 srel = htab->srelgot;
1930 *local_tlsdesc_gotent = htab->sgotplt->size
1931 - elf_i386_compute_jump_table_size (htab);
1932 htab->sgotplt->size += 8;
1954 htab->srelplt->size += sizeof (Elf32_External_Rel);
1962 if (htab->tls_ldm_got.refcount > 0)
1966 htab->tls_ldm_got.offset = htab->sgot->size;
1967 htab->sgot->size += 8;
1968 htab->srelgot->size += sizeof (Elf32_External_Rel);
1971 htab->tls_ldm_got.offset = -1;
1975 elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
1982 if (htab->srelplt)
1983 htab->sgotplt_jump_table_size = htab->next_tls_desc_index * 4;
1995 if (s == htab->splt
1996 || s == htab->sgot
1997 || s == htab->sgotplt
1998 || s == htab->sdynbss)
2006 if (htab->elf.hplt != NULL)
2011 if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2)
2053 if (htab->elf.dynamic_sections_created)
2069 if (htab->splt->size != 0)
2088 elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
2191 struct elf_link_hash_table *htab = elf_hash_table (info);
2194 if (htab->tls_sec == NULL)
2196 return htab->tls_size + htab->tls_sec->vma - address;
2211 struct elf_i386_link_hash_table *htab;
2219 htab = elf_i386_hash_table (info);
2373 if (htab->sgot == NULL)
2381 dyn = htab->elf.dynamic_sections_created;
2405 htab->sgot->contents + off);
2427 htab->sgot->contents + off);
2435 s = htab->srelgot;
2439 outrel.r_offset = (htab->sgot->output_section->vma
2440 + htab->sgot->output_offset
2455 relocation = htab->sgot->output_section->vma
2456 + htab->sgot->output_offset + off
2457 - htab->sgotplt->output_section->vma
2458 - htab->sgotplt->output_offset;
2487 relocation -= htab->sgotplt->output_section->vma
2488 + htab->sgotplt->output_offset;
2493 relocation = htab->sgotplt->output_section->vma
2494 + htab->sgotplt->output_offset;
2508 || htab->splt == NULL)
2516 relocation = (htab->splt->output_section->vma
2517 + htab->splt->output_offset
2879 if (htab->sgot == NULL)
2905 if (htab->srelgot == NULL)
2913 BFD_ASSERT (htab->sgotplt_jump_table_size + offplt + 8
2914 <= htab->sgotplt->size);
2915 outrel.r_offset = (htab->sgotplt->output_section->vma
2916 + htab->sgotplt->output_offset
2918 + htab->sgotplt_jump_table_size);
2919 sreloc = htab->srelplt;
2921 loc += (htab->next_tls_desc_index++
2931 htab->sgotplt->contents + offplt
2932 + htab->sgotplt_jump_table_size + 4);
2937 htab->sgotplt->contents + offplt
2938 + htab->sgotplt_jump_table_size + 4);
2942 sreloc = htab->srelgot;
2944 outrel.r_offset = (htab->sgot->output_section->vma
2945 + htab->sgot->output_offset + off);
2958 htab->sgot->contents + off);
2961 htab->sgot->contents + off);
2964 htab->sgot->contents + off);
2980 htab->sgot->contents + off + 4);
2985 htab->sgot->contents + off + 4);
3000 htab->sgot->contents + off + 4);
3021 relocation = htab->sgotplt_jump_table_size + offplt;
3026 bfd_vma g_o_t = htab->sgotplt->output_section->vma
3027 + htab->sgotplt->output_offset;
3028 relocation = htab->sgot->output_section->vma
3029 + htab->sgot->output_offset + off - g_o_t;
3088 htab->sgot->output_section->vma
3089 + htab->sgot->output_offset + off
3090 - htab->sgotplt->output_section->vma
3091 - htab->sgotplt->output_offset,
3136 htab->sgot->output_section->vma
3137 + htab->sgot->output_offset + off
3138 - htab->sgotplt->output_section->vma
3139 - htab->sgotplt->output_offset,
3214 if (htab->sgot == NULL)
3217 off = htab->tls_ldm_got.offset;
3225 if (htab->srelgot == NULL)
3228 outrel.r_offset = (htab->sgot->output_section->vma
3229 + htab->sgot->output_offset + off);
3232 htab->sgot->contents + off);
3234 htab->sgot->contents + off + 4);
3236 loc = htab->srelgot->contents;
3237 loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rel);
3239 htab->tls_ldm_got.offset |= 1;
3241 relocation = htab->sgot->output_section->vma
3242 + htab->sgot->output_offset + off
3243 - htab->sgotplt->output_section->vma
3244 - htab->sgotplt->output_offset;
3368 struct elf_i386_link_hash_table *htab;
3370 htab = elf_i386_hash_table (info);
3383 || htab->splt == NULL
3384 || htab->sgotplt == NULL
3385 || htab->srelplt == NULL)
3402 memcpy (htab->splt->contents + h->plt.offset, elf_i386_plt_entry,
3405 (htab->sgotplt->output_section->vma
3406 + htab->sgotplt->output_offset
3408 htab->splt->contents + h->plt.offset + 2);
3410 if (htab->is_vxworks)
3427 loc = (htab->srelplt2->contents + reloc_index
3430 rel.r_offset = (htab->splt->output_section->vma
3431 + htab->splt->output_offset
3433 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
3438 rel.r_offset = (htab->sgotplt->output_section->vma
3439 + htab->sgotplt->output_offset
3441 rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32);
3448 memcpy (htab->splt->contents + h->plt.offset, elf_i386_pic_plt_entry,
3451 htab->splt->contents + h->plt.offset + 2);
3455 htab->splt->contents + h->plt.offset + 7);
3457 htab->splt->contents + h->plt.offset + 12);
3461 (htab->splt->output_section->vma
3462 + htab->splt->output_offset
3465 htab->sgotplt->contents + got_offset);
3468 rel.r_offset = (htab->sgotplt->output_section->vma
3469 + htab->sgotplt->output_offset
3472 loc = htab->srelplt->contents + plt_index * sizeof (Elf32_External_Rel);
3501 if (htab->sgot == NULL || htab->srelgot == NULL)
3504 rel.r_offset = (htab->sgot->output_section->vma
3505 + htab->sgot->output_offset
3523 htab->sgot->contents + h->got.offset);
3527 loc = htab->srelgot->contents;
3528 loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rel);
3542 || htab->srelbss == NULL)
3549 loc = htab->srelbss->contents;
3550 loc += htab->srelbss->reloc_count++ * sizeof (Elf32_External_Rel);
3558 || (!htab->is_vxworks && h == htab->elf.hgot))
3589 struct elf_i386_link_hash_table *htab;
3593 htab = elf_i386_hash_table (info);
3594 dynobj = htab->elf.dynobj;
3597 if (htab->elf.dynamic_sections_created)
3601 if (sdyn == NULL || htab->sgot == NULL)
3619 s = htab->sgotplt;
3624 s = htab->srelplt;
3629 s = htab->srelplt;
3640 s = htab->srelplt;
3650 s = htab->srelplt;
3663 if (htab->splt && htab->splt->size > 0)
3667 memcpy (htab->splt->contents, elf_i386_pic_plt0_entry,
3669 memset (htab->splt->contents + sizeof (elf_i386_pic_plt0_entry),
3670 htab->plt0_pad_byte,
3675 memcpy (htab->splt->contents, elf_i386_plt0_entry,
3677 memset (htab->splt->contents + sizeof (elf_i386_plt0_entry),
3678 htab->plt0_pad_byte,
3681 (htab->sgotplt->output_section->vma
3682 + htab->sgotplt->output_offset
3684 htab->splt->contents + 2);
3686 (htab->sgotplt->output_section->vma
3687 + htab->sgotplt->output_offset
3689 htab->splt->contents + 8);
3691 if (htab->is_vxworks)
3698 rel.r_offset = (htab->splt->output_section->vma
3699 + htab->splt->output_offset
3701 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
3703 htab->srelplt2->contents);
3705 rel.r_offset = (htab->splt->output_section->vma
3706 + htab->splt->output_offset
3708 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
3710 htab->srelplt2->contents +
3717 elf_section_data (htab->splt->output_section)
3721 if (htab->is_vxworks && !info->shared)
3723 int num_plts = (htab->splt->size / PLT_ENTRY_SIZE) - 1;
3726 p = htab->srelplt2->contents;
3736 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_386_32);
3741 rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_386_32);
3749 if (htab->sgotplt)
3752 if (htab->sgotplt->size > 0)
3757 htab->sgotplt->contents);
3758 bfd_put_32 (output_bfd, 0, htab->sgotplt->contents + 4);
3759 bfd_put_32 (output_bfd, 0, htab->sgotplt->contents + 8);
3762 elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize = 4;
3765 if (htab->sgot && htab->sgot->size > 0)
3766 elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 4;
3891 struct elf_i386_link_hash_table *htab;
3896 htab = (struct elf_i386_link_hash_table *) ret;
3897 htab->is_vxworks = 1;
3898 htab->plt0_pad_byte = 0x90;