Lines Matching full:htab
33 #define TILEGX_ELF_WORD_BYTES(htab) \
34 ((htab)->bytes_per_word)
37 #define TILEGX_ELF_RELA_BYTES(htab) \
38 ((htab)->bytes_per_rela)
45 #define TILEGX_ELF_R_INFO(htab, in_rel, index, type) \
46 ((htab)->r_info (in_rel, index, type))
48 #define TILEGX_ELF_R_SYMNDX(htab, r_info) \
49 ((htab)->r_symndx(r_info))
51 #define TILEGX_ELF_DTPOFF_RELOC(htab) \
52 ((htab)->dtpoff_reloc)
54 #define TILEGX_ELF_DTPMOD_RELOC(htab) \
55 ((htab)->dtpmod_reloc)
57 #define TILEGX_ELF_TPOFF_RELOC(htab) \
58 ((htab)->tpoff_reloc)
60 #define TILEGX_ELF_PUT_WORD(htab, bfd, val, ptr) \
61 ((htab)->put_word (bfd, val, ptr))
1178 #define GOT_ENTRY_SIZE(htab) TILEGX_ELF_WORD_BYTES (htab)
1180 #define GOTPLT_HEADER_SIZE(htab) (2 * GOT_ENTRY_SIZE (htab))
1274 struct tilegx_elf_link_hash_table *htab,
1279 int got_offset = (plt_index * GOT_ENTRY_SIZE (htab)
1280 + GOTPLT_HEADER_SIZE (htab));
1440 struct elf_link_hash_table *htab = elf_hash_table (info);
1457 htab->srelgot = s;
1463 htab->sgot = s;
1475 htab->sgotplt = s;
1505 struct tilegx_elf_link_hash_table *htab;
1507 htab = tilegx_elf_hash_table (info);
1508 BFD_ASSERT (htab != NULL);
1516 htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
1518 htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
1520 if (!htab->elf.splt || !htab->elf.srelplt || !htab->sdynbss
1521 || (!info->shared && !htab->srelbss))
1664 struct tilegx_elf_link_hash_table *htab;
1676 htab = tilegx_elf_hash_table (info);
1686 if (htab->elf.dynobj == NULL)
1687 htab->elf.dynobj = abfd;
1715 htab->disable_le_transition |= sec->sec_flg0;
1724 r_symndx = TILEGX_ELF_R_SYMNDX (htab, rel->r_info);
1852 if (htab->elf.sgot == NULL)
1854 if (!tilegx_elf_create_got_section (htab->elf.dynobj, info))
2029 (sec, htab->elf.dynobj, htab->word_align_power, abfd,
2051 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
2069 bfd_alloc (htab->elf.dynobj, amt));
2153 struct tilegx_elf_link_hash_table *htab;
2166 htab = tilegx_elf_hash_table (info);
2167 BFD_ASSERT (htab != NULL);
2179 r_symndx = TILEGX_ELF_R_SYMNDX (htab, rel->r_info);
2347 struct tilegx_elf_link_hash_table *htab;
2353 htab = tilegx_elf_hash_table (info);
2354 BFD_ASSERT (htab != NULL);
2356 dynobj = htab->elf.dynobj;
2457 htab->srelbss->size += TILEGX_ELF_RELA_BYTES (htab);
2461 return _bfd_elf_adjust_dynamic_copy (h, htab->sdynbss);
2471 struct tilegx_elf_link_hash_table *htab;
2479 htab = tilegx_elf_hash_table (info);
2480 BFD_ASSERT (htab != NULL);
2482 if (htab->elf.dynamic_sections_created
2496 asection *s = htab->elf.splt;
2522 htab->elf.sgotplt->size += GOT_ENTRY_SIZE (htab);
2525 htab->elf.srelplt->size += TILEGX_ELF_RELA_BYTES (htab);
2542 && !htab->disable_le_transition
2562 s = htab->elf.sgot;
2564 s->size += TILEGX_ELF_WORD_BYTES (htab);
2567 s->size += TILEGX_ELF_WORD_BYTES (htab);
2568 dyn = htab->elf.dynamic_sections_created;
2572 htab->elf.srelgot->size += 2 * TILEGX_ELF_RELA_BYTES (htab);
2574 htab->elf.srelgot->size += TILEGX_ELF_RELA_BYTES (htab);
2633 || (htab->elf.dynamic_sections_created
2661 sreloc->size += p->count * TILEGX_ELF_RELA_BYTES (htab);
2714 struct tilegx_elf_link_hash_table *htab;
2719 htab = tilegx_elf_hash_table (info);
2720 BFD_ASSERT (htab != NULL);
2721 dynobj = htab->elf.dynobj;
2731 s->size = strlen (htab->dynamic_interpreter) + 1;
2732 s->contents = (unsigned char *) htab->dynamic_interpreter;
2767 srel->size += p->count * TILEGX_ELF_RELA_BYTES (htab);
2782 s = htab->elf.sgot;
2783 srel = htab->elf.srelgot;
2789 s->size += TILEGX_ELF_WORD_BYTES (htab);
2791 s->size += TILEGX_ELF_WORD_BYTES (htab);
2795 srel->size += TILEGX_ELF_RELA_BYTES (htab);
2804 elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, info);
2811 if (htab->elf.sgot->size >= 0x8000
2816 if (htab->elf.sgotplt)
2827 && (htab->elf.sgotplt->size
2828 == (unsigned)GOTPLT_HEADER_SIZE (htab))
2829 && (htab->elf.splt == NULL
2830 || htab->elf.splt->size == 0)
2831 && (htab->elf.sgot == NULL
2832 || (htab->elf.sgot->size
2834 htab->elf.sgotplt->size = 0;
2845 if (s == htab->elf.splt
2846 || s == htab->elf.sgot
2847 || s == htab->elf.sgotplt
2848 || s == htab->sdynbss)
2910 if (htab->elf.srelplt->size != 0)
2921 || !add_dynamic_entry (DT_RELAENT, TILEGX_ELF_RELA_BYTES (htab)))
2927 elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, info);
2959 struct elf_link_hash_table *htab = elf_hash_table (info);
2962 if (htab->tls_sec == NULL)
2965 return (address - htab->tls_sec->vma);
3122 struct tilegx_elf_link_hash_table *htab;
3132 htab = tilegx_elf_hash_table (info);
3133 BFD_ASSERT (htab != NULL);
3184 r_symndx = TILEGX_ELF_R_SYMNDX (htab, rel->r_info);
3434 if (htab->elf.sgot == NULL)
3465 TILEGX_ELF_PUT_WORD (htab, output_bfd, relocation,
3466 htab->elf.sgot->contents + off);
3494 s = htab->elf.srelgot;
3497 outrel.r_offset = (htab->elf.sgot->output_section->vma
3498 + htab->elf.sgot->output_offset
3501 TILEGX_ELF_R_INFO (htab, NULL, 0, R_TILEGX_RELATIVE);
3507 TILEGX_ELF_PUT_WORD (htab, output_bfd, relocation,
3508 htab->elf.sgot->contents + off);
3534 if (h->plt.offset == (bfd_vma) -1 || htab->elf.splt == NULL)
3542 relocation = (htab->elf.splt->output_section->vma
3543 + htab->elf.splt->output_offset
3681 outrel.r_info = TILEGX_ELF_R_INFO (htab, rel, h->dynindx, r_type);
3688 outrel.r_info = TILEGX_ELF_R_INFO (htab, NULL, 0,
3699 sec = htab->elf.splt;
3722 osec = htab->elf.text_index_section;
3739 outrel.r_info = TILEGX_ELF_R_INFO (htab, rel, indx,
3779 outrel.r_info = TILEGX_ELF_R_INFO (htab, NULL, 0, r_type);
3843 if (htab->elf.sgot == NULL)
3854 if (htab->elf.srelgot == NULL)
3860 dyn = htab->elf.dynamic_sections_created;
3887 TILEGX_ELF_PUT_WORD (htab, output_bfd, 0,
3888 htab->elf.sgot->contents + off);
3889 outrel.r_offset = (htab->elf.sgot->output_section->vma
3890 + htab->elf.sgot->output_offset + off);
3894 outrel.r_info = TILEGX_ELF_R_INFO (htab, NULL, indx,
3895 TILEGX_ELF_TPOFF_RELOC (htab));
3896 tilegx_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel);
3898 TILEGX_ELF_PUT_WORD (htab, output_bfd,
3900 htab->elf.sgot->contents + off);
3911 outrel.r_offset = (htab->elf.sgot->output_section->vma
3912 + htab->elf.sgot->output_offset + off);
3914 outrel.r_info = TILEGX_ELF_R_INFO (htab, NULL, indx,
3915 TILEGX_ELF_DTPMOD_RELOC (htab));
3916 TILEGX_ELF_PUT_WORD (htab, output_bfd, 0,
3917 htab->elf.sgot->contents + off);
3918 tilegx_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel);
3922 TILEGX_ELF_PUT_WORD (htab, output_bfd,
3924 (htab->elf.sgot->contents + off +
3925 TILEGX_ELF_WORD_BYTES (htab)));
3929 TILEGX_ELF_PUT_WORD (htab, output_bfd, 0,
3930 (htab->elf.sgot->contents + off +
3931 TILEGX_ELF_WORD_BYTES (htab)));
3932 outrel.r_info = TILEGX_ELF_R_INFO (htab, NULL, indx,
3933 TILEGX_ELF_DTPOFF_RELOC (htab));
3934 outrel.r_offset += TILEGX_ELF_WORD_BYTES (htab);
3935 tilegx_elf_append_rela (output_bfd, htab->elf.srelgot, &outrel);
3945 TILEGX_ELF_PUT_WORD (htab, output_bfd, 1,
3946 htab->elf.sgot->contents + off );
3947 TILEGX_ELF_PUT_WORD (htab, output_bfd,
3949 htab->elf.sgot->contents + off +
3950 TILEGX_ELF_WORD_BYTES (htab));
4013 TILEGX_ELF_WORD_BYTES (htab) * 8,
4091 struct tilegx_elf_link_hash_table *htab;
4093 htab = tilegx_elf_hash_table (info);
4094 BFD_ASSERT (htab != NULL);
4113 splt = htab->elf.splt;
4114 srela = htab->elf.srelplt;
4115 sgotplt = htab->elf.sgotplt;
4121 rela_index = tilegx_plt_entry_build (output_bfd, htab, splt, sgotplt,
4126 TILEGX_ELF_PUT_WORD (htab, output_bfd,
4135 rela.r_info = TILEGX_ELF_R_INFO (htab, NULL, h->dynindx, R_TILEGX_JMP_SLOT);
4137 loc = srela->contents + rela_index * TILEGX_ELF_RELA_BYTES (htab);
4164 sgot = htab->elf.sgot;
4165 srela = htab->elf.srelgot;
4182 rela.r_info = TILEGX_ELF_R_INFO (htab, NULL, 0, R_TILEGX_RELATIVE);
4189 rela.r_info = TILEGX_ELF_R_INFO (htab, NULL, h->dynindx, R_TILEGX_GLOB_DAT);
4193 TILEGX_ELF_PUT_WORD (htab, output_bfd, 0,
4206 s = htab->srelbss;
4212 rela.r_info = TILEGX_ELF_R_INFO (htab, NULL, h->dynindx, R_TILEGX_COPY);
4218 if (h == htab->elf.hdynamic
4219 || (h == htab->elf.hgot || h == htab->elf.hplt))
4232 struct tilegx_elf_link_hash_table *htab;
4237 htab = tilegx_elf_hash_table (info);
4238 BFD_ASSERT (htab != NULL);
4253 s = htab->elf.sgotplt;
4257 s = htab->elf.srelplt;
4261 s = htab->elf.srelplt;
4279 struct tilegx_elf_link_hash_table *htab;
4282 htab = tilegx_elf_hash_table (info);
4283 BFD_ASSERT (htab != NULL);
4284 dynobj = htab->elf.dynobj;
4293 splt = htab->elf.splt;
4324 if (htab->elf.sgotplt)
4326 if (bfd_is_abs_section (htab->elf.sgotplt->output_section))
4329 (_("discarded output section: `%A'"), htab->elf.sgotplt);
4333 if (htab->elf.sgotplt->size > 0)
4337 TILEGX_ELF_PUT_WORD (htab, output_bfd, (bfd_vma) -1,
4338 htab->elf.sgotplt->contents);
4339 TILEGX_ELF_PUT_WORD (htab, output_bfd, (bfd_vma) 0,
4340 htab->elf.sgotplt->contents
4341 + GOT_ENTRY_SIZE (htab));
4344 elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize =
4345 GOT_ENTRY_SIZE (htab);
4348 if (htab->elf.sgot)
4350 if (htab->elf.sgot->size > 0)
4357 TILEGX_ELF_PUT_WORD (htab, output_bfd, val,
4358 htab->elf.sgot->contents);
4361 elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize =
4362 GOT_ENTRY_SIZE (htab);