Home | History | Annotate | Download | only in bfd

Lines Matching full:htab

176   struct htab *got_entries;
178 struct htab *got_page_refs;
180 struct htab *got_page_entries;
1793 struct mips_elf_link_hash_table *htab;
1795 htab = mips_elf_hash_table (info);
1796 if (htab == NULL)
1799 htab->add_stub_section = fn;
1800 htab->la25_stubs = htab_try_create (1, mips_elf_la25_stub_hash,
1802 if (htab->la25_stubs == NULL)
1855 struct mips_elf_link_hash_table *htab;
1860 htab = mips_elf_hash_table (info);
1861 if (htab == NULL)
1868 sprintf (name, ".text.stub.%d", (int) htab_elements (htab->la25_stubs));
1872 s = htab->add_stub_section (name, input_section,
1902 struct mips_elf_link_hash_table *htab;
1905 htab = mips_elf_hash_table (info);
1906 if (htab == NULL)
1910 s = htab->strampoline;
1914 s = htab->add_stub_section (".text", NULL,
1918 htab->strampoline = s;
1938 struct mips_elf_link_hash_table *htab;
1951 htab = mips_elf_hash_table (info);
1952 if (htab == NULL)
1955 slot = htab_find_slot (htab->la25_stubs, &search, INSERT);
3339 struct mips_elf_link_hash_table *htab;
3345 htab = mips_elf_hash_table (info);
3346 if (htab == NULL)
3349 sgot = htab->sgot;
3465 struct mips_elf_link_hash_table *htab;
3467 htab = mips_elf_hash_table (info);
3468 BFD_ASSERT (htab != NULL);
3474 got_address = (htab->sgotplt->output_section->vma
3475 + htab->sgotplt->output_offset
3480 got_value = (htab->root.hgot->root.u.def.section->output_section->vma
3481 + htab->root.hgot->root.u.def.section->output_offset
3482 + htab->root.hgot->root.u.def.value);
3497 struct mips_elf_link_hash_table *htab;
3500 htab = mips_elf_hash_table (info);
3501 BFD_ASSERT (htab != NULL);
3519 struct mips_elf_link_hash_table *htab;
3524 htab = mips_elf_hash_table (info);
3525 BFD_ASSERT (htab != NULL);
3528 if (htab->global_gotsym != NULL)
3529 global_got_dynindx = htab->global_gotsym->dynindx;
3539 BFD_ASSERT (got_index < htab->sgot->size);
3551 struct mips_elf_link_hash_table *htab;
3556 htab = mips_elf_hash_table (info);
3557 BFD_ASSERT (htab != NULL);
3573 BFD_ASSERT (gotidx > 0 && gotidx < htab->sgot->size);
3654 struct mips_elf_link_hash_table *htab;
3658 htab = mips_elf_hash_table (info);
3659 BFD_ASSERT (htab != NULL);
3661 sgot = htab->sgot;
3663 + mips_elf_adjust_gp (output_bfd, htab->got_info, input_bfd);
3683 struct mips_elf_link_hash_table *htab;
3686 htab = mips_elf_hash_table (info);
3687 BFD_ASSERT (htab != NULL);
3724 BFD_ASSERT (gotidx > 0 && gotidx < htab->sgot->size);
3764 MIPS_ELF_PUT_WORD (abfd, value, htab->sgot->contents + entry->gotidx);
3767 if (htab->is_vxworks)
3775 got_address = (htab->sgot->output_section->vma
3776 + htab->sgot->output_offset
3821 struct mips_elf_link_hash_table *htab;
3828 htab = mips_elf_hash_table (info);
3829 BFD_ASSERT (htab != NULL);
3831 g = htab->got_info;
3855 htab->global_gotsym = hsd.low;
3903 struct mips_elf_link_hash_table *htab;
3909 htab = mips_elf_hash_table (info);
3910 g = htab->got_info;
3952 struct mips_elf_link_hash_table *htab;
3957 htab = mips_elf_hash_table (info);
3958 BFD_ASSERT (htab != NULL);
3997 struct mips_elf_link_hash_table *htab;
4001 htab = mips_elf_hash_table (info);
4002 BFD_ASSERT (htab != NULL);
4004 g = htab->got_info;
4023 struct mips_elf_link_hash_table *htab;
4028 htab = mips_elf_hash_table (info);
4029 BFD_ASSERT (htab != NULL);
4031 g1 = htab->got_info;
4082 struct mips_elf_link_hash_table *htab;
4084 htab = mips_elf_hash_table (info);
4085 BFD_ASSERT (htab != NULL);
4090 if (htab->is_vxworks)
4295 struct mips_elf_link_hash_table *htab;
4301 htab = mips_elf_hash_table (arg->info);
4327 isym = bfd_sym_from_r_symndx (&htab->sym_cache, ref->u.abfd,
4456 struct mips_elf_link_hash_table *htab;
4460 htab = mips_elf_hash_table (info);
4461 g = htab->got_info;
4471 else if (htab->is_vxworks
4767 struct mips_elf_link_hash_table *htab;
4772 htab = mips_elf_hash_table (info);
4773 BFD_ASSERT (htab != NULL);
4780 htab->lazy_stub_count--;
4813 struct mips_elf_link_hash_table *htab;
4821 htab = mips_elf_hash_table (info);
4822 BFD_ASSERT (htab != NULL);
4824 g = htab->got_info;
4832 - htab->reserved_gotno);
4902 assign += htab->reserved_gotno;
4962 + htab->reserved_gotno);
5126 struct mips_elf_link_hash_table *htab;
5128 htab = mips_elf_hash_table (info);
5129 BFD_ASSERT (htab != NULL);
5132 if (htab->sgot)
5144 htab->sgot = s;
5166 htab->got_info = mips_elf_create_got_info (abfd);
5178 htab->sgotplt = s;
5300 struct mips_elf_link_hash_table *htab;
5304 htab = mips_elf_hash_table (info);
5305 BFD_ASSERT (htab != NULL);
5578 sec = htab->splt;
5581 + htab->plt_header_size
5582 + htab->plt_mips_offset
5618 if (htab->got_info)
5619 gp += mips_elf_adjust_gp (abfd, htab->got_info, input_bfd);
5675 if (htab->is_vxworks
5692 MIPS_ELF_PUT_WORD (dynobj, symbol, htab->sgot->contents + g);
5695 else if (!htab->is_vxworks
5757 || (htab->root.dynamic_sections_created
5973 if (!htab->is_vxworks && local_p)
6377 struct mips_elf_link_hash_table *htab;
6379 htab = mips_elf_hash_table (info);
6380 BFD_ASSERT (htab != NULL);
6417 BFD_ASSERT (htab->is_vxworks || h->global_got_area != GGA_NONE);
6442 asection *osec = htab->root.text_index_section;
6476 if (htab->is_vxworks)
6522 else if (htab->is_vxworks)
7611 struct mips_elf_link_hash_table *htab;
7613 htab = mips_elf_hash_table (info);
7614 BFD_ASSERT (htab != NULL);
7621 if (!htab->is_vxworks)
7646 htab->sstubs = s;
7765 htab->splt = bfd_get_linker_section (abfd, ".plt");
7766 htab->sdynbss = bfd_get_linker_section (abfd, ".dynbss");
7767 if (htab->is_vxworks)
7769 htab->srelbss = bfd_get_linker_section (abfd, ".rela.bss");
7770 htab->srelplt = bfd_get_linker_section (abfd, ".rela.plt");
7773 htab->srelplt = bfd_get_linker_section (abfd, ".rel.plt");
7774 if (!htab->sdynbss
7775 || (htab->is_vxworks && !htab->srelbss && !info->shared)
7776 || !htab->srelplt
7777 || !htab->splt)
7781 if (htab->is_vxworks
7782 && !elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2))
7949 struct mips_elf_link_hash_table *htab;
7957 htab = mips_elf_hash_table (info);
7958 BFD_ASSERT (htab != NULL);
8310 if (htab->is_vxworks && !info->shared)
8355 && !htab->is_vxworks
8396 if (!htab->is_vxworks && (!can_make_dynamic_p || !call_reloc_p))
8421 || (got16_reloc_p (r_type) && htab->is_vxworks))
8917 struct mips_elf_link_hash_table *htab;
8919 htab = mips_elf_hash_table (info);
8920 BFD_ASSERT (htab != NULL);
8927 if (htab->is_vxworks && !info->shared)
8972 if (!htab->is_vxworks)
9003 struct mips_elf_link_hash_table *htab;
9005 htab = mips_elf_hash_table (info);
9006 BFD_ASSERT (htab != NULL);
9029 if (!htab->is_vxworks && h->needs_plt && !hmips->no_fn_stub)
9041 htab->lazy_stub_count++;
9057 && htab->use_plts_and_copy_relocs
9068 if (htab->plt_mips_offset + htab->plt_comp_offset == 0)
9070 BFD_ASSERT (htab->sgotplt->size == 0);
9071 BFD_ASSERT (htab->plt_got_index == 0);
9077 if (!htab->is_vxworks
9078 && !bfd_set_section_alignment (dynobj, htab->splt, 5))
9083 if (!bfd_set_section_alignment (dynobj, htab->sgotplt,
9089 if (!htab->is_vxworks)
9090 htab->plt_got_index
9096 if (htab->is_vxworks && !info->shared)
9097 htab->srelplt2->size += 2 * sizeof (Elf32_External_Rela);
9100 if (htab->is_vxworks && info->shared)
9101 htab->plt_mips_entry_size
9103 else if (htab->is_vxworks)
9104 htab->plt_mips_entry_size
9107 htab->plt_mips_entry_size
9111 htab->plt_mips_entry_size
9113 htab->plt_comp_entry_size
9116 else if (htab->insn32)
9118 htab->plt_mips_entry_size
9120 htab->plt_comp_entry_size
9125 htab->plt_mips_entry_size
9127 htab->plt_comp_entry_size
9146 || htab->is_vxworks
9170 h->plt.plist->mips_offset = htab->plt_mips_offset;
9171 htab->plt_mips_offset += htab->plt_mips_entry_size;
9175 h->plt.plist->comp_offset = htab->plt_comp_offset;
9176 htab->plt_comp_offset += htab->plt_comp_entry_size;
9180 h->plt.plist->gotplt_index = htab->plt_got_index++;
9188 htab->srelplt->size += (htab->is_vxworks
9193 if (htab->is_vxworks && !info->shared)
9194 htab->srelplt2->size += 3 * sizeof (Elf32_External_Rela);
9227 if (!htab->use_plts_and_copy_relocs || info->shared)
9248 if (htab->is_vxworks)
9249 htab->srelbss->size += sizeof (Elf32_External_Rela);
9259 return _bfd_elf_adjust_dynamic_copy (h, htab->sdynbss);
9272 struct mips_elf_link_hash_table *htab;
9275 htab = mips_elf_hash_table (info);
9276 BFD_ASSERT (htab != NULL);
9311 struct mips_elf_link_hash_table *htab;
9313 htab = mips_elf_hash_table (info);
9314 BFD_ASSERT (htab != NULL);
9316 s = htab->sgot;
9321 g = htab->got_info;
9326 if (htab->is_vxworks)
9327 htab->reserved_gotno = 3;
9329 htab->reserved_gotno = 2;
9330 g->local_gotno += htab->reserved_gotno;
9331 g->assigned_low_gotno = htab->reserved_gotno;
9335 mips_elf_link_hash_traverse (htab, mips_elf_count_got_symbols, info);
9358 if (htab->is_vxworks)
9383 if (!htab->is_vxworks && s->size > MIPS_ELF_GOT_MAX_SIZE (info))
9409 if (htab->is_vxworks && info->shared)
9410 g->relocs += g->global_gotno + g->local_gotno - htab->reserved_gotno;
9425 struct mips_elf_link_hash_table *htab;
9428 htab = mips_elf_hash_table (info);
9429 BFD_ASSERT (htab != NULL);
9431 if (htab->lazy_stub_count == 0)
9436 htab->lazy_stub_count++;
9451 htab->function_stub_size = (dynsymcount > 0x10000
9454 else if (htab->insn32)
9455 htab->function_stub_size = (dynsymcount > 0x10000
9459 htab->function_stub_size = (dynsymcount > 0x10000
9463 htab->sstubs->size = htab->lazy_stub_count * htab->function_stub_size;
9474 struct mips_elf_link_hash_table *htab;
9480 htab = mips_elf_hash_table (info);
9481 BFD_ASSERT (htab != NULL);
9489 BFD_ASSERT (htab->root.dynobj != NULL);
9491 h->root.plt.plist = mips_elf_make_plt_record (htab->sstubs->owner);
9497 h->root.root.u.def.section = htab->sstubs;
9498 h->root.root.u.def.value = htab->sstubs->size + isa_bit;
9499 h->root.plt.plist->stub_offset = htab->sstubs->size;
9501 htab->sstubs->size += htab->function_stub_size;
9516 struct mips_elf_link_hash_table *htab;
9521 htab = mips_elf_hash_table (info);
9522 BFD_ASSERT (htab != NULL);
9524 if (htab->lazy_stub_count == 0)
9527 htab->sstubs->size = 0;
9531 mips_elf_link_hash_traverse (htab, mips_elf_allocate_lazy_stub, &hti);
9534 htab->sstubs->size += htab->function_stub_size;
9535 BFD_ASSERT (htab->sstubs->size
9536 == htab->lazy_stub_count * htab->function_stub_size);
9540 h = _bfd_elf_define_linkage_sym (dynobj, info, htab->sstubs, "_MIPS_STUBS_");
9560 struct mips_elf_link_hash_table *htab;
9565 htab = mips_elf_hash_table (info);
9566 BFD_ASSERT (htab != NULL);
9574 val = htab->plt_header_size;
9584 val += htab->plt_mips_offset + h->root.plt.plist->comp_offset;
9591 if (htab->is_vxworks)
9594 h->root.root.u.def.section = htab->splt;
9611 struct mips_elf_link_hash_table *htab;
9613 htab = mips_elf_hash_table (info);
9614 BFD_ASSERT (htab != NULL);
9643 if (htab->splt && htab->plt_mips_offset + htab->plt_comp_offset != 0)
9646 && !htab->plt_mips_offset);
9652 BFD_ASSERT (htab->use_plts_and_copy_relocs);
9653 BFD_ASSERT (htab->sgotplt->size == 0);
9654 BFD_ASSERT (htab->splt->size == 0);
9656 if (htab->is_vxworks && info->shared)
9658 else if (htab->is_vxworks)
9666 else if (htab->insn32)
9671 htab->plt_header_is_comp = micromips_p;
9672 htab->plt_header_size = size;
9673 htab->splt->size = (size
9674 + htab->plt_mips_offset
9675 + htab->plt_comp_offset);
9676 htab->sgotplt->size = (htab->plt_got_index
9679 mips_elf_link_hash_traverse (htab, mips_elf_set_plt_sym_value, info);
9681 if (htab->root.hplt == NULL)
9683 h = _bfd_elf_define_linkage_sym (dynobj, info, htab->splt,
9685 htab->root.hplt = h;
9690 h = htab->root.hplt;
9698 elf_link_hash_traverse (&htab->root, allocate_dynrelocs, info);
9769 else if (s == htab->splt)
9775 && ! htab->is_vxworks && s->size > 0)
9779 && s != htab->sgot
9780 && s != htab->sgotplt
9781 && s != htab->sstubs
9782 && s != htab->sdynbss)
9832 if (reltext && (SGI_COMPAT (output_bfd) || htab->is_vxworks))
9851 if (htab->is_vxworks)
9912 if (htab->splt->size > 0)
9926 if (htab->is_vxworks
10271 struct mips_elf_link_hash_table *htab;
10273 htab = mips_elf_hash_table (info);
10274 BFD_ASSERT (htab != NULL);
10276 if (!htab->small_data_overflow_reported
10283 htab->small_data_overflow_reported = TRUE;
10389 struct mips_elf_link_hash_table *htab;
10397 htab = mips_elf_hash_table (hti->info);
10398 BFD_ASSERT (htab != NULL);
10424 if (stub->stub_section != htab->strampoline)
10534 struct mips_elf_link_hash_table *htab;
10537 htab = mips_elf_hash_table (info);
10538 BFD_ASSERT (htab != NULL);
10542 BFD_ASSERT (!htab->is_vxworks);
10557 BFD_ASSERT (htab->use_plts_and_copy_relocs);
10559 BFD_ASSERT (htab->splt != NULL);
10564 isa_bit = htab->plt_header_is_comp;
10565 header_address = (htab->splt->output_section->vma
10566 + htab->splt->output_offset + isa_bit);
10569 got_address = (htab->sgotplt->output_section->vma
10570 + htab->sgotplt->output_offset
10577 loc = (htab->sgotplt->contents + got_index * MIPS_ELF_GOT_SIZE (dynobj));
10590 plt_offset = htab->plt_header_size + h->plt.plist->mips_offset;
10592 BFD_ASSERT (plt_offset <= htab->splt->size);
10595 loc = htab->splt->contents + plt_offset;
10631 plt_offset = (htab->plt_header_size + htab->plt_mips_offset
10634 BFD_ASSERT (plt_offset <= htab->splt->size);
10637 loc = htab->splt->contents + plt_offset;
10652 else if (htab->insn32)
10673 loc_address = (htab->splt->output_section->vma
10674 + htab->splt->output_offset + plt_offset);
10684 htab->sgotplt->output_section,
10685 htab->splt->output_section,
10701 mips_elf_output_dynamic_relocation (output_bfd, htab->srelplt,
10724 bfd_vma stub_size = htab->function_stub_size;
10731 else if (htab->insn32)
10755 if (htab->insn32)
10776 if (htab->insn32)
10833 BFD_ASSERT (h->plt.plist->stub_offset <= htab->sstubs->size);
10834 memcpy (htab->sstubs->contents + h->plt.plist->stub_offset,
10844 sym->st_value = (htab->sstubs->output_section->vma
10845 + htab->sstubs->output_offset
10866 sgot = htab->sgot;
10867 g = htab->got_info;
10902 BFD_ASSERT (offset > 0 && offset < htab->sgot->size);
10987 BFD_ASSERT (htab->use_plts_and_copy_relocs);
11028 struct mips_elf_link_hash_table *htab;
11031 htab = mips_elf_hash_table (info);
11032 BFD_ASSERT (htab != NULL);
11045 plt_offset = htab->plt_header_size + h->plt.plist->mips_offset;
11049 BFD_ASSERT (htab->splt != NULL);
11051 BFD_ASSERT (plt_offset <= htab->splt->size);
11054 plt_address = (htab->splt->output_section->vma
11055 + htab->splt->output_offset
11059 got_address = (htab->sgotplt->output_section->vma
11060 + htab->sgotplt->output_offset
11073 (htab->sgotplt->contents
11077 loc = htab->splt->contents + plt_offset;
11102 loc = (htab->srelplt2->contents
11107 rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_MIPS_32);
11114 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_HI16);
11121 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_LO16);
11126 loc = (htab->srelplt->contents
11139 sgot = htab->sgot;
11140 g = htab->got_info;
11179 htab->srelbss->contents
11180 + (htab->srelbss->reloc_count
11182 ++htab->srelbss->reloc_count;
11200 struct mips_elf_link_hash_table *htab;
11202 htab = mips_elf_hash_table (info);
11203 BFD_ASSERT (htab != NULL);
11209 else if (!htab->plt_header_is_comp)
11211 else if (htab->insn32)
11217 gotplt_value = (htab->sgotplt->output_section->vma
11218 + htab->sgotplt->output_offset);
11228 loc = htab->splt->contents;
11237 loc_address = (htab->splt->output_section->vma
11238 + htab->splt->output_offset);
11247 htab->sgotplt->output_section,
11248 htab->splt->output_section,
11297 struct mips_elf_link_hash_table *htab;
11299 htab = mips_elf_hash_table (info);
11300 BFD_ASSERT (htab != NULL);
11305 got_value = (htab->root.hgot->root.u.def.section->output_section->vma
11306 + htab->root.hgot->root.u.def.section->output_offset
11307 + htab->root.hgot->root.u.def.value);
11313 plt_address = htab->splt->output_section->vma + htab->splt->output_offset;
11316 loc = htab->splt->contents;
11325 loc = htab->srelplt2->contents;
11327 rela.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_HI16);
11335 rela.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_LO16);
11342 while (loc < htab->srelplt2->contents + htab->srelplt2->size)
11347 rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_MIPS_32);
11352 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_HI16);
11357 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_MIPS_LO16);
11369 struct mips_elf_link_hash_table *htab;
11371 htab = mips_elf_hash_table (info);
11372 BFD_ASSERT (htab != NULL);
11377 htab->splt->contents + i * 4);
11390 struct mips_elf_link_hash_table *htab;
11392 htab = mips_elf_hash_table (info);
11393 BFD_ASSERT (htab != NULL);
11399 sgot = htab->sgot;
11400 gg = htab->got_info;
11436 BFD_ASSERT (htab->is_vxworks);
11447 s = htab->sgot;
11452 s = htab->sgotplt;
11500 if (htab->global_gotsym)
11502 dyn.d_un.d_val = htab->global_gotsym->dynindx;
11521 dyn.d_un.d_val = g->local_gotno - htab->reserved_gotno;
11568 BFD_ASSERT (htab->is_vxworks);
11570 if (htab->srelplt)
11571 dyn.d_un.d_val -= htab->srelplt->size;
11575 BFD_ASSERT (htab->use_plts_and_copy_relocs);
11576 if (htab->is_vxworks)
11583 BFD_ASSERT (htab->use_plts_and_copy_relocs);
11584 dyn.d_un.d_val = htab->srelplt->size;
11588 BFD_ASSERT (htab->use_plts_and_copy_relocs);
11589 dyn.d_un.d_ptr = (htab->srelplt->output_section->vma
11590 + htab->srelplt->output_offset);
11614 if (htab->is_vxworks
11639 if (htab->is_vxworks)
11785 if (htab->sstubs != NULL)
11789 BFD_ASSERT (htab->sstubs->size >= htab->function_stub_size);
11790 dummy_offset = htab->sstubs->size - htab->function_stub_size;
11791 memset (htab->sstubs->contents + dummy_offset, 0,
11792 htab->function_stub_size);
11801 if (!htab->is_vxworks)
11821 if (htab->splt && htab->splt->size > 0)
11823 if (htab->is_vxworks)
13934 struct mips_elf_link_hash_table *htab;
13936 htab = (struct mips_elf_link_hash_table *) ret;
13937 htab->use_plts_and_copy_relocs = TRUE;
13938 htab->is_vxworks = TRUE;
14166 struct mips_elf_link_hash_table *htab;
14181 htab = mips_elf_hash_table (info);
14182 BFD_ASSERT (htab != NULL);
14191 htab_traverse (htab->la25_stubs, mips_elf_create_la25_stub, &hti);
14205 else if (htab->is_vxworks
16170 struct mips_elf_link_hash_table *htab;
16176 htab = mips_elf_hash_table (link_info);
16177 BFD_ASSERT (htab != NULL);
16179 if (htab->use_plts_and_copy_relocs && !htab->is_vxworks)