Lines Matching refs:htab

128    elf32_hppa_link_hash_table		"htab"
419 struct elf32_hppa_link_hash_table *htab;
420 bfd_size_type amt = sizeof (*htab);
422 htab = bfd_malloc (amt);
423 if (htab == NULL)
426 if (!_bfd_elf_link_hash_table_init (&htab->etab, abfd, hppa_link_hash_newfunc,
430 free (htab);
435 if (!bfd_hash_table_init (&htab->bstab, stub_hash_newfunc,
439 htab->stub_bfd = NULL;
440 htab->add_stub_section = NULL;
441 htab->layout_sections_again = NULL;
442 htab->stub_group = NULL;
443 htab->sgot = NULL;
444 htab->srelgot = NULL;
445 htab->splt = NULL;
446 htab->srelplt = NULL;
447 htab->sdynbss = NULL;
448 htab->srelbss = NULL;
449 htab->text_segment_base = (bfd_vma) -1;
450 htab->data_segment_base = (bfd_vma) -1;
451 htab->multi_subspace = 0;
452 htab->has_12bit_branch = 0;
453 htab->has_17bit_branch = 0;
454 htab->has_22bit_branch = 0;
455 htab->need_plt_stub = 0;
456 htab->sym_cache.abfd = NULL;
457 htab->tls_ldm_got.refcount = 0;
459 return &htab->etab.root;
467 struct elf32_hppa_link_hash_table *htab
470 bfd_hash_table_free (&htab->bstab);
517 struct elf32_hppa_link_hash_table *htab)
527 id_sec = htab->stub_group[input_section->id].link_sec;
543 hsh_entry = hppa_stub_hash_lookup (&htab->bstab,
560 struct elf32_hppa_link_hash_table *htab)
566 link_sec = htab->stub_group[section->id].link_sec;
567 stub_sec = htab->stub_group[section->id].stub_sec;
570 stub_sec = htab->stub_group[link_sec->id].stub_sec;
579 s_name = bfd_alloc (htab->stub_bfd, len);
585 stub_sec = (*htab->add_stub_section) (s_name, link_sec);
588 htab->stub_group[link_sec->id].stub_sec = stub_sec;
590 htab->stub_group[section->id].stub_sec = stub_sec;
594 hsh = hppa_stub_hash_lookup (&htab->bstab, stub_name,
709 struct elf32_hppa_link_hash_table *htab;
723 htab = hppa_link_hash_table (info);
724 if (htab == NULL)
787 + htab->splt->output_offset
788 + htab->splt->output_section->vma
789 - elf_gp (htab->splt->output_section->owner));
809 if (htab->multi_subspace)
846 && (!htab->has_22bit_branch
860 if (!htab->has_22bit_branch)
916 struct elf32_hppa_link_hash_table *htab;
921 htab = in_arg;
931 if (htab->multi_subspace)
994 struct elf32_hppa_link_hash_table *htab;
998 htab = hppa_link_hash_table (info);
999 if (htab == NULL)
1001 if (htab->splt != NULL)
1008 htab->splt = bfd_get_section_by_name (abfd, ".plt");
1009 htab->srelplt = bfd_get_section_by_name (abfd, ".rela.plt");
1011 htab->sgot = bfd_get_section_by_name (abfd, ".got");
1012 htab->srelgot = bfd_get_section_by_name (abfd, ".rela.got");
1014 htab->sdynbss = bfd_get_section_by_name (abfd, ".dynbss");
1015 htab->srelbss = bfd_get_section_by_name (abfd, ".rela.bss");
1152 struct elf32_hppa_link_hash_table *htab;
1159 htab = hppa_link_hash_table (info);
1160 if (htab == NULL)
1232 htab->has_12bit_branch = 1;
1237 htab->has_17bit_branch = 1;
1241 htab->has_22bit_branch = 1;
1360 if (htab->sgot == NULL)
1362 if (htab->etab.dynobj == NULL)
1363 htab->etab.dynobj = abfd;
1364 if (!elf32_hppa_create_dynamic_sections (htab->etab.dynobj, info))
1370 htab->tls_ldm_got.refcount += 1;
1499 if (htab->etab.dynobj == NULL)
1500 htab->etab.dynobj = abfd;
1503 (sec, htab->etab.dynobj, 2, abfd, /*rela?*/ TRUE);
1527 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
1543 hdh_p = bfd_alloc (htab->etab.dynobj, sizeof *hdh_p);
1602 struct elf32_hppa_link_hash_table *htab;
1607 htab = hppa_link_hash_table (info);
1608 if (htab == NULL)
1675 htab->tls_ldm_got.refcount -= 1;
1809 struct elf32_hppa_link_hash_table *htab;
1909 htab = hppa_link_hash_table (info);
1910 if (htab == NULL)
1918 htab->srelbss->size += sizeof (Elf32_External_Rela);
1922 sec = htab->sdynbss;
1934 struct elf32_hppa_link_hash_table *htab;
1946 htab = hppa_link_hash_table (info);
1947 if (htab == NULL)
1950 if (htab->etab.dynamic_sections_created
1976 sec = htab->splt;
2003 struct elf32_hppa_link_hash_table *htab;
2015 htab = hppa_link_hash_table (info);
2016 if (htab == NULL)
2021 if (htab->etab.dynamic_sections_created
2027 sec = htab->splt;
2032 htab->srelplt->size += sizeof (Elf32_External_Rela);
2033 htab->need_plt_stub = 1;
2048 sec = htab->sgot;
2056 if (htab->etab.dynamic_sections_created
2061 htab->srelgot->size += sizeof (Elf32_External_Rela);
2063 htab->srelgot->size += 2 * sizeof (Elf32_External_Rela);
2065 htab->srelgot->size += sizeof (Elf32_External_Rela);
2126 || (htab->etab.dynamic_sections_created
2219 struct elf32_hppa_link_hash_table *htab;
2225 htab = hppa_link_hash_table (info);
2226 if (htab == NULL)
2229 dynobj = htab->etab.dynobj;
2233 if (htab->etab.dynamic_sections_created)
2246 elf_link_hash_traverse (&htab->etab,
2302 sec = htab->sgot;
2303 srel = htab->srelgot;
2331 if (! htab->etab.dynamic_sections_created)
2339 sec = htab->splt;
2340 srel = htab->srelplt;
2356 if (htab->tls_ldm_got.refcount > 0)
2360 htab->tls_ldm_got.offset = htab->sgot->size;
2361 htab->sgot->size += (GOT_ENTRY_SIZE * 2);
2362 htab->srelgot->size += sizeof (Elf32_External_Rela);
2365 htab->tls_ldm_got.offset = -1;
2370 elf_link_hash_traverse (&htab->etab, allocate_plt_static, info);
2374 elf_link_hash_traverse (&htab->etab, allocate_dynrelocs, info);
2385 if (sec == htab->splt)
2387 if (htab->need_plt_stub)
2392 int gotalign = bfd_section_alignment (dynobj, htab->sgot);
2402 else if (sec == htab->sgot
2403 || sec == htab->sdynbss)
2411 if (sec != htab->srelplt)
2450 if (htab->etab.dynamic_sections_created)
2473 if (htab->srelplt->size != 0)
2491 elf_link_hash_traverse (&htab->etab, readonly_dynrelocs, info);
2520 struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
2522 if (htab == NULL)
2539 htab->bfd_count = bfd_count;
2542 htab->stub_group = bfd_zmalloc (amt);
2543 if (htab->stub_group == NULL)
2557 htab->top_index = top_index;
2560 htab->input_list = input_list;
2590 struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
2592 if (htab == NULL)
2595 if (isec->output_section->index <= htab->top_index)
2597 asection **list = htab->input_list + isec->output_section->index;
2601 #define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec)
2618 group_sections (struct elf32_hppa_link_hash_table *htab,
2622 asection **list = htab->input_list + htab->top_index;
2661 htab->stub_group[tail->id].link_sec = curr;
2679 htab->stub_group[tail->id].link_sec = curr;
2685 while (list-- != htab->input_list);
2686 free (htab->input_list);
2700 struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
2702 if (htab == NULL)
2708 bfd_size_type amt = sizeof (Elf_Internal_Sym *) * htab->bfd_count;
2710 htab->all_local_syms = all_local_syms;
2743 if (info->shared && htab->multi_subspace)
2786 hsh = hppa_stub_hash_lookup (&htab->bstab,
2791 hsh = hppa_add_stub (stub_name, sec, htab);
2831 struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info);
2833 if (htab == NULL)
2837 htab->stub_bfd = stub_bfd;
2838 htab->multi_subspace = multi_subspace;
2839 htab->add_stub_section = add_stub_section;
2840 htab->layout_sections_again = layout_sections_again;
2852 if (htab->has_17bit_branch || htab->multi_subspace)
2854 if (htab->has_12bit_branch)
2860 if (htab->has_17bit_branch || htab->multi_subspace)
2862 if (htab->has_12bit_branch)
2867 group_sections (htab, stub_group_size, stubs_always_before_branch);
2872 if (htab->all_local_syms)
2904 local_syms = htab->all_local_syms[bfd_indx];
3040 id_sec = htab->stub_group[section->id].link_sec;
3047 hsh = hppa_stub_hash_lookup (&htab->bstab,
3057 hsh = hppa_add_stub (stub_name, section, htab);
3089 for (stub_sec = htab->stub_bfd->sections;
3094 bfd_hash_traverse (&htab->bstab, hppa_size_one_stub, htab);
3097 (*htab->layout_sections_again) ();
3101 free (htab->all_local_syms);
3105 free (htab->all_local_syms);
3118 struct elf32_hppa_link_hash_table *htab;
3120 htab = hppa_link_hash_table (info);
3121 if (htab == NULL)
3124 h = bfd_link_hash_lookup (&htab->etab.root, "$global$", FALSE, FALSE, FALSE);
3205 struct elf32_hppa_link_hash_table *htab;
3207 htab = hppa_link_hash_table (info);
3208 if (htab == NULL)
3211 for (stub_sec = htab->stub_bfd->sections;
3219 stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
3226 table = &htab->bstab;
3250 struct elf_link_hash_table *htab = elf_hash_table (info);
3253 if (htab->tls_sec == NULL)
3257 return (address - htab->tls_sec->vma
3258 + align_power ((bfd_vma) 8, htab->tls_sec->alignment_power));
3283 struct elf32_hppa_link_hash_table *htab;
3285 htab = (struct elf32_hppa_link_hash_table*) data;
3286 if (htab == NULL)
3300 if (value < htab->text_segment_base)
3301 htab->text_segment_base = value;
3305 if (value < htab->data_segment_base)
3306 htab->data_segment_base = value;
3318 struct elf32_hppa_link_hash_table *htab,
3386 hh, rela, htab);
3495 value -= htab->text_segment_base;
3497 value -= htab->data_segment_base;
3586 hh, rela, htab);
3661 struct elf32_hppa_link_hash_table *htab;
3668 htab = hppa_link_hash_table (info);
3669 if (htab == NULL)
3772 dyn = htab->etab.dynamic_sections_created;
3820 asection *sec = htab->srelgot;
3823 + htab->sgot->output_offset
3824 + htab->sgot->output_section->vma);
3833 htab->sgot->contents + off);
3841 + htab->sgot->output_offset
3842 + htab->sgot->output_section->vma);
3849 if (htab->text_segment_base == (bfd_vma) -1)
3850 bfd_map_over_sections (output_bfd, hppa_record_segment_addr, htab);
3856 if (htab->etab.dynamic_sections_created)
3910 asection *s = htab->srelplt;
3913 + htab->splt->output_offset
3914 + htab->splt->output_section->vma);
3925 htab->splt->contents + off);
3927 elf_gp (htab->splt->output_section->owner),
3928 htab->splt->contents + off + 4);
3946 + htab->splt->output_offset
3947 + htab->splt->output_section->vma
4050 osec = htab->etab.text_index_section;
4079 off = htab->tls_ldm_got.offset;
4088 + htab->sgot->output_section->vma
4089 + htab->sgot->output_offset);
4092 loc = htab->srelgot->contents;
4093 loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
4096 htab->tls_ldm_got.offset |= 1;
4101 + htab->sgot->output_offset
4102 + htab->sgot->output_section->vma);
4125 dyn = htab->etab.dynamic_sections_created;
4164 loc = htab->srelgot->contents;
4166 loc += htab->srelgot->reloc_count * sizeof (Elf32_External_Rela);
4174 + htab->sgot->output_section->vma
4175 + htab->sgot->output_offset);
4178 bfd_put_32 (output_bfd, 0, htab->sgot->contents + cur_off);
4180 htab->srelgot->reloc_count++;
4185 htab->sgot->contents + cur_off + 4);
4189 htab->sgot->contents + cur_off + 4);
4193 htab->srelgot->reloc_count++;
4205 htab->sgot->contents + cur_off);
4207 htab->sgot->contents + cur_off + 4);
4219 + htab->sgot->output_section->vma
4220 + htab->sgot->output_offset);
4229 htab->srelgot->reloc_count++;
4234 htab->sgot->contents + cur_off);
4252 + htab->sgot->output_offset
4253 + htab->sgot->output_section->vma);
4271 htab, sym_sec, hh, info);
4327 struct elf32_hppa_link_hash_table *htab;
4331 htab = hppa_link_hash_table (info);
4332 if (htab == NULL)
4361 + htab->splt->output_offset
4362 + htab->splt->output_section->vma);
4376 loc = htab->srelplt->contents;
4377 loc += htab->srelplt->reloc_count++ * sizeof (Elf32_External_Rela);
4378 bfd_elf32_swap_reloca_out (htab->splt->output_section->owner, &rela, loc);
4396 + htab->sgot->output_offset
4397 + htab->sgot->output_section->vma);
4418 bfd_put_32 (output_bfd, 0, htab->sgot->contents + (eh->got.offset & ~1));
4423 loc = htab->srelgot->contents;
4424 loc += htab->srelgot->reloc_count++ * sizeof (Elf32_External_Rela);
4439 sec = htab->srelbss;
4453 || eh == htab->etab.hgot))
4499 struct elf32_hppa_link_hash_table *htab;
4502 htab = hppa_link_hash_table (info);
4503 if (htab == NULL)
4506 dynobj = htab->etab.dynobj;
4510 if (htab->etab.dynamic_sections_created)
4537 s = htab->srelplt;
4542 s = htab->srelplt;
4549 s = htab->srelplt;
4559 s = htab->srelplt;
4572 if (htab->sgot != NULL && htab->sgot->size != 0)
4578 htab->sgot->contents);
4581 memset (htab->sgot->contents + GOT_ENTRY_SIZE, 0, GOT_ENTRY_SIZE);
4584 elf_section_data (htab->sgot->output_section)
4588 if (htab->splt != NULL && htab->splt->size != 0)
4591 elf_section_data (htab->splt->output_section)
4594 if (htab->need_plt_stub)
4597 memcpy (htab->splt->contents
4598 + htab->splt->size - sizeof (plt_stub),
4601 if ((htab->splt->output_offset
4602 + htab->splt->output_section->vma
4603 + htab->splt->size)
4604 != (htab->sgot->output_offset
4605 + htab->sgot->output_section->vma))