Lines Matching refs:htab

501 #define elf64_x86_64_compute_jump_table_size(htab) \
502 ((htab)->srelplt->reloc_count * GOT_ENTRY_SIZE)
576 struct elf64_x86_64_link_hash_table *htab;
581 htab = elf64_x86_64_hash_table (info);
582 htab->sgot = bfd_get_section_by_name (dynobj, ".got");
583 htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
584 if (!htab->sgot || !htab->sgotplt)
587 htab->srelgot = bfd_make_section_with_flags (dynobj, ".rela.got",
593 if (htab->srelgot == NULL
594 || ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
606 struct elf64_x86_64_link_hash_table *htab;
608 htab = elf64_x86_64_hash_table (info);
609 if (!htab->sgot && !create_got_section (dynobj, info))
615 htab->splt = bfd_get_section_by_name (dynobj, ".plt");
616 htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
617 htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
619 htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
621 if (!htab->splt || !htab->srelplt || !htab->sdynbss
622 || (!info->shared && !htab->srelbss))
746 struct elf64_x86_64_link_hash_table *htab;
756 htab = elf64_x86_64_hash_table (info);
793 htab->tls_ld_got.refcount += 1;
911 if (htab->sgot == NULL)
913 if (htab->elf.dynobj == NULL)
914 htab->elf.dynobj = abfd;
915 if (!create_got_section (htab->elf.dynobj, info))
1056 if (htab->elf.dynobj == NULL)
1057 htab->elf.dynobj = abfd;
1059 dynobj = htab->elf.dynobj;
1094 s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
1110 bfd_alloc (htab->elf.dynobj, amt));
1290 struct elf64_x86_64_link_hash_table *htab;
1398 htab = elf64_x86_64_hash_table (info);
1405 htab->srelbss->size += sizeof (Elf64_External_Rela);
1409 s = htab->sdynbss;
1421 struct elf64_x86_64_link_hash_table *htab;
1432 htab = elf64_x86_64_hash_table (info);
1434 if (htab->elf.dynamic_sections_created
1449 asection *s = htab->splt;
1475 htab->sgotplt->size += GOT_ENTRY_SIZE;
1478 htab->srelplt->size += sizeof (Elf64_External_Rela);
1479 htab->srelplt->reloc_count++;
1520 eh->tlsdesc_got = htab->sgotplt->size
1521 - elf64_x86_64_compute_jump_table_size (htab);
1522 htab->sgotplt->size += 2 * GOT_ENTRY_SIZE;
1528 s = htab->sgot;
1534 dyn = htab->elf.dynamic_sections_created;
1540 htab->srelgot->size += sizeof (Elf64_External_Rela);
1542 htab->srelgot->size += 2 * sizeof (Elf64_External_Rela);
1548 htab->srelgot->size += sizeof (Elf64_External_Rela);
1551 htab->srelplt->size += sizeof (Elf64_External_Rela);
1552 htab->tlsdesc_plt = (bfd_vma) -1;
1617 || (htab->elf.dynamic_sections_created
1686 struct elf64_x86_64_link_hash_table *htab;
1692 htab = elf64_x86_64_hash_table (info);
1693 dynobj = htab->elf.dynobj;
1697 if (htab->elf.dynamic_sections_created)
1762 s = htab->sgot;
1763 srel = htab->srelgot;
1772 *local_tlsdesc_gotent = htab->sgotplt->size
1773 - elf64_x86_64_compute_jump_table_size (htab);
1774 htab->sgotplt->size += 2 * GOT_ENTRY_SIZE;
1791 htab->srelplt->size += sizeof (Elf64_External_Rela);
1792 htab->tlsdesc_plt = (bfd_vma) -1;
1804 if (htab->tls_ld_got.refcount > 0)
1808 htab->tls_ld_got.offset = htab->sgot->size;
1809 htab->sgot->size += 2 * GOT_ENTRY_SIZE;
1810 htab->srelgot->size += sizeof (Elf64_External_Rela);
1813 htab->tls_ld_got.offset = -1;
1817 elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
1824 if (htab->srelplt)
1825 htab->sgotplt_jump_table_size
1826 = elf64_x86_64_compute_jump_table_size (htab);
1828 if (htab->tlsdesc_plt)
1833 htab->tlsdesc_plt = 0;
1836 htab->tlsdesc_got = htab->sgot->size;
1837 htab->sgot->size += GOT_ENTRY_SIZE;
1840 if (htab->splt->size == 0)
1841 htab->splt->size += PLT_ENTRY_SIZE;
1842 htab->tlsdesc_plt = htab->splt->size;
1843 htab->splt->size += PLT_ENTRY_SIZE;
1855 if (s == htab->splt
1856 || s == htab->sgot
1857 || s == htab->sgotplt
1858 || s == htab->sdynbss)
1865 if (s->size != 0 && s != htab->srelplt)
1870 if (s != htab->srelplt)
1908 if (htab->elf.dynamic_sections_created)
1924 if (htab->splt->size != 0)
1932 if (htab->tlsdesc_plt
1948 elf_link_hash_traverse (&htab->elf, readonly_dynrelocs,
2017 struct elf_link_hash_table *htab = elf_hash_table (info);
2020 if (htab->tls_sec == NULL)
2022 return address - htab->tls_size - htab->tls_sec->vma;
2052 struct elf64_x86_64_link_hash_table *htab;
2060 htab = elf64_x86_64_hash_table (info);
2149 base_got = htab->sgot;
2151 if (htab->sgot == NULL)
2169 base_got = htab->sgotplt;
2172 dyn = htab->elf.dynamic_sections_created;
2230 s = htab->srelgot;
2254 relocation -= htab->sgotplt->output_section->vma
2255 - htab->sgotplt->output_offset;
2284 relocation -= htab->sgotplt->output_section->vma
2285 + htab->sgotplt->output_offset;
2291 relocation = htab->sgotplt->output_section->vma
2292 + htab->sgotplt->output_offset;
2302 && htab->splt != NULL)
2304 relocation = (htab->splt->output_section->vma
2305 + htab->splt->output_offset
2310 relocation -= htab->sgotplt->output_section->vma
2311 + htab->sgotplt->output_offset;
2324 || htab->splt == NULL)
2332 relocation = (htab->splt->output_section->vma
2333 + htab->splt->output_offset
2472 asection *oi = htab->elf.text_index_section;
2682 if (htab->sgot == NULL)
2708 if (htab->srelgot == NULL)
2716 BFD_ASSERT (htab->sgotplt_jump_table_size + offplt
2717 + 2 * GOT_ENTRY_SIZE <= htab->sgotplt->size);
2718 outrel.r_offset = (htab->sgotplt->output_section->vma
2719 + htab->sgotplt->output_offset
2721 + htab->sgotplt_jump_table_size);
2722 sreloc = htab->srelplt;
2735 sreloc = htab->srelgot;
2737 outrel.r_offset = (htab->sgot->output_section->vma
2738 + htab->sgot->output_offset + off);
2747 bfd_put_64 (output_bfd, 0, htab->sgot->contents + off);
2767 htab->sgot->contents + off + GOT_ENTRY_SIZE);
2772 htab->sgot->contents + off + GOT_ENTRY_SIZE);
2798 relocation = htab->sgotplt->output_section->vma
2799 + htab->sgotplt->output_offset
2800 + offplt + htab->sgotplt_jump_table_size;
2802 relocation = htab->sgot->output_section->vma
2803 + htab->sgot->output_offset + off;
2834 relocation = (htab->sgot->output_section->vma
2835 + htab->sgot->output_offset + off
2880 htab->sgot->output_section->vma
2881 + htab->sgot->output_offset + off
2947 if (htab->sgot == NULL)
2950 off = htab->tls_ld_got.offset;
2958 if (htab->srelgot == NULL)
2961 outrel.r_offset = (htab->sgot->output_section->vma
2962 + htab->sgot->output_offset + off);
2965 htab->sgot->contents + off);
2967 htab->sgot->contents + off + GOT_ENTRY_SIZE);
2970 loc = htab->srelgot->contents;
2971 loc += htab->srelgot->reloc_count++ * sizeof (Elf64_External_Rela);
2973 htab->tls_ld_got.offset |= 1;
2975 relocation = htab->sgot->output_section->vma
2976 + htab->sgot->output_offset + off;
3062 struct elf64_x86_64_link_hash_table *htab;
3064 htab = elf64_x86_64_hash_table (info);
3076 || htab->splt == NULL
3077 || htab->sgotplt == NULL
3078 || htab->srelplt == NULL)
3093 memcpy (htab->splt->contents + h->plt.offset, elf64_x86_64_plt_entry,
3102 (htab->sgotplt->output_section->vma
3103 + htab->sgotplt->output_offset
3105 - htab->splt->output_section->vma
3106 - htab->splt->output_offset
3109 htab->splt->contents + h->plt.offset + 2);
3112 htab->splt->contents + h->plt.offset + 7);
3115 htab->splt->contents + h->plt.offset + 12);
3119 bfd_put_64 (output_bfd, (htab->splt->output_section->vma
3120 + htab->splt->output_offset
3122 htab->sgotplt->contents + got_offset);
3125 rela.r_offset = (htab->sgotplt->output_section->vma
3126 + htab->sgotplt->output_offset
3130 loc = htab->srelplt->contents + plt_index * sizeof (Elf64_External_Rela);
3158 if (htab->sgot == NULL || htab->srelgot == NULL)
3161 rela.r_offset = (htab->sgot->output_section->vma
3162 + htab->sgot->output_offset
3183 htab->sgot->contents + h->got.offset);
3188 loc = htab->srelgot->contents;
3189 loc += htab->srelgot->reloc_count++ * sizeof (Elf64_External_Rela);
3203 || htab->srelbss == NULL)
3211 loc = htab->srelbss->contents;
3212 loc += htab->srelbss->reloc_count++ * sizeof (Elf64_External_Rela);
3218 || h == htab->elf.hgot)
3248 struct elf64_x86_64_link_hash_table *htab;
3252 htab = elf64_x86_64_hash_table (info);
3253 dynobj = htab->elf.dynobj;
3256 if (htab->elf.dynamic_sections_created)
3260 if (sdyn == NULL || htab->sgot == NULL)
3278 s = htab->sgotplt;
3283 dyn.d_un.d_ptr = htab->srelplt->output_section->vma;
3287 s = htab->srelplt->output_section;
3299 if (htab->srelplt != NULL)
3301 s = htab->srelplt->output_section;
3307 s = htab->splt;
3309 + htab->tlsdesc_plt;
3313 s = htab->sgot;
3315 + htab->tlsdesc_got;
3323 if (htab->splt && htab->splt->size > 0)
3326 memcpy (htab->splt->contents, elf64_x86_64_plt0_entry,
3331 (htab->sgotplt->output_section->vma
3332 + htab->sgotplt->output_offset
3334 - htab->splt->output_section->vma
3335 - htab->splt->output_offset
3337 htab->splt->contents + 2);
3341 (htab->sgotplt->output_section->vma
3342 + htab->sgotplt->output_offset
3344 - htab->splt->output_section->vma
3345 - htab->splt->output_offset
3347 htab->splt->contents + 8);
3349 elf_section_data (htab->splt->output_section)->this_hdr.sh_entsize =
3352 if (htab->tlsdesc_plt)
3355 htab->sgot->contents + htab->tlsdesc_got);
3357 memcpy (htab->splt->contents + htab->tlsdesc_plt,
3364 (htab->sgotplt->output_section->vma
3365 + htab->sgotplt->output_offset
3367 - htab->splt->output_section->vma
3368 - htab->splt->output_offset
3369 - htab->tlsdesc_plt
3371 htab->splt->contents + htab->tlsdesc_plt + 2);
3373 htab->tlsdesc_got. The 12 is the offset to the end of
3376 (htab->sgot->output_section->vma
3377 + htab->sgot->output_offset
3378 + htab->tlsdesc_got
3379 - htab->splt->output_section->vma
3380 - htab->splt->output_offset
3381 - htab->tlsdesc_plt
3383 htab->splt->contents + htab->tlsdesc_plt + 8);
3388 if (htab->sgotplt)
3391 if (htab->sgotplt->size > 0)
3396 bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents);
3400 htab->sgotplt->contents);
3402 bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + GOT_ENTRY_SIZE);
3403 bfd_put_64 (output_bfd, (bfd_vma) 0, htab->sgotplt->contents + GOT_ENTRY_SIZE*2);
3406 elf_section_data (htab->sgotplt->output_section)->this_hdr.sh_entsize =
3410 if (htab->sgot && htab->sgot->size > 0)
3411 elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize