Home | History | Annotate | Download | only in bfd

Lines Matching full:htab

205 /* Return size of a relocation entry.  HTAB is the bfd's
207 #define RELOC_SIZE(HTAB) (sizeof (ElfNN_External_Rela))
218 #define aarch64_compute_jump_table_size(htab) \
219 (((htab)->root.srelplt == NULL) ? 0 \
220 : (htab)->root.srelplt->reloc_count * GOT_ENTRY_SIZE)
1995 elfNN_aarch64_get_local_sym_hash (struct elf_aarch64_link_hash_table *htab,
2007 slot = htab_find_slot_with_hash (htab->loc_hash_table, &e, h,
2020 objalloc_alloc ((struct objalloc *) htab->loc_hash_memory,
2271 struct elf_aarch64_link_hash_table *htab)
2286 id_sec = htab->stub_group[input_section->id].link_sec;
2301 stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table,
2317 struct elf_aarch64_link_hash_table *htab)
2325 s_name = bfd_alloc (htab->stub_bfd, len);
2331 return (*htab->add_stub_section) (s_name, section);
2342 struct elf_aarch64_link_hash_table *htab)
2344 if (htab->stub_group[link_section->id].stub_sec == NULL)
2345 htab->stub_group[link_section->id].stub_sec
2346 = _bfd_aarch64_create_stub_section (link_section, htab);
2347 return htab->stub_group[link_section->id].stub_sec;
2356 struct elf_aarch64_link_hash_table *htab)
2358 asection *link_sec = htab->stub_group[section->id].link_sec;
2359 return _bfd_aarch64_get_stub_for_link_section (link_sec, htab);
2370 struct elf_aarch64_link_hash_table *htab)
2376 link_sec = htab->stub_group[section->id].link_sec;
2377 stub_sec = _bfd_aarch64_create_or_find_stub_sec (section, htab);
2380 stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table, stub_name,
2402 struct elf_aarch64_link_hash_table *htab)
2407 stub_sec = _bfd_aarch64_get_stub_for_link_section (link_section, htab);
2408 stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table, stub_name,
2610 htab =
2613 if (!is_elf_hash_table (htab))
2628 htab->bfd_count = bfd_count;
2631 htab->stub_group = bfd_zmalloc (amt);
2632 if (htab->stub_group == NULL)
2645 htab->top_index = top_index;
2648 htab->input_list = input_list;
2670 #define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec)
2680 struct elf_aarch64_link_hash_table *htab =
2683 if (isec->output_section->index <= htab->top_index)
2685 asection **list = htab->input_list + isec->output_section->index;
2706 group_sections (struct elf_aarch64_link_hash_table *htab,
2710 asection **list = htab->input_list + htab->top_index;
2743 htab->stub_group[tail->id].link_sec = curr;
2758 htab->stub_group[tail->id].link_sec = curr;
2764 while (list-- != htab->input_list);
2766 free (htab->input_list);
3052 struct elf_aarch64_link_hash_table *htab = elf_aarch64_hash_table (info);
3055 if (htab == NULL)
3109 htab);
3211 _bfd_aarch64_resize_stubs (struct elf_aarch64_link_hash_table *htab)
3217 for (section = htab->stub_bfd->sections;
3226 bfd_hash_traverse (&htab->stub_hash_table, aarch64_size_one_stub, htab);
3228 for (section = htab->stub_bfd->sections;
3241 if (htab->fix_erratum_843419)
3280 struct elf_aarch64_link_hash_table *htab = elf_aarch64_hash_table (info);
3285 stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table, stub_name,
3305 stub_entry = _bfd_aarch64_add_stub_entry_after (stub_name, section, htab);
3336 struct elf_aarch64_link_hash_table *htab = elf_aarch64_hash_table (info);
3338 if (htab == NULL)
3422 struct elf_aarch64_link_hash_table *htab = elf_aarch64_hash_table (info);
3431 htab->stub_bfd = stub_bfd;
3432 htab->add_stub_section = add_stub_section;
3433 htab->layout_sections_again = layout_sections_again;
3447 group_sections (htab, stub_group_size, stubs_always_before_branch);
3449 (*htab->layout_sections_again) ();
3451 if (htab->fix_erratum_835769)
3461 _bfd_aarch64_resize_stubs (htab);
3462 (*htab->layout_sections_again) ();
3465 if (htab->fix_erratum_843419)
3482 _bfd_aarch64_resize_stubs (htab);
3483 (*htab->layout_sections_again) ();
3690 id_sec = htab->stub_group[section->id].link_sec;
3699 aarch64_stub_hash_lookup (&htab->stub_hash_table,
3709 (stub_name, section, htab);
3725 stub_entry->output_name = bfd_alloc (htab->stub_bfd, len);
3747 _bfd_aarch64_resize_stubs (htab);
3750 (*htab->layout_sections_again) ();
3771 struct elf_aarch64_link_hash_table *htab;
3773 htab = elf_aarch64_hash_table (info);
3775 for (stub_sec = htab->stub_bfd->sections;
3786 stub_sec->contents = bfd_zalloc (htab->stub_bfd, size);
3796 table = &htab->stub_hash_table;
4100 struct elf_link_hash_table *htab = elf_hash_table (info);
4103 BFD_ASSERT (htab->tls_sec != NULL);
4106 htab->tls_sec->alignment_power);
4107 return htab->tls_sec->vma - base;
4274 struct elf_aarch64_link_hash_table *htab;
4285 htab = elf_aarch64_hash_table (info);
4307 if (htab->fix_erratum_843419_adr
5234 * RELOC_SIZE (htab);
5316 * RELOC_SIZE (htab);
5629 struct elf_aarch64_link_hash_table *htab;
5638 htab = elf_aarch64_hash_table (info);
5640 if (htab == NULL)
5672 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
5679 h = elfNN_aarch64_get_local_sym_hash (htab, abfd, rel, FALSE);
5788 struct elf_aarch64_link_hash_table *htab;
5865 htab = elf_aarch64_hash_table (info);
5872 htab->srelbss->size += RELOC_SIZE (htab);
5876 s = htab->sdynbss;
5907 struct elf_link_hash_table *htab = elf_hash_table (info);
5924 htab->srelgot = s;
5930 htab->sgot = s;
5931 htab->sgot->size += GOT_ENTRY_SIZE;
5953 htab->sgotplt = s;
5974 struct elf_aarch64_link_hash_table *htab;
5981 htab = elf_aarch64_hash_table (info);
6009 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
6017 h = elfNN_aarch64_get_local_sym_hash (htab, abfd, rel,
6067 if (htab->root.dynobj == NULL)
6068 htab->root.dynobj = abfd;
6069 if (!_bfd_elf_create_ifunc_sections (htab->root.dynobj, info))
6111 if (htab->root.dynobj == NULL)
6112 htab->root.dynobj = abfd;
6115 (sec, htab->root.dynobj, LOG_FILE_ALIGN, abfd, /*rela? */ TRUE);
6138 isym = bfd_sym_from_r_symndx (&htab->sym_cache,
6158 bfd_zalloc (htab->root.dynobj, amt));
6251 if (htab->root.dynobj == NULL)
6252 htab->root.dynobj = abfd;
6253 if (! aarch64_elf_create_got_section (htab->root.dynobj, info))
6761 struct elf_aarch64_link_hash_table *htab;
6763 htab = elf_aarch64_hash_table (info);
6770 if (htab->stub_bfd && htab->stub_bfd->sections)
6774 for (stub_sec = htab->stub_bfd->sections;
6790 bfd_hash_traverse (&htab->stub_hash_table, aarch64_map_one_stub,
6796 if (!htab->root.splt || htab->root.splt->size == 0)
6801 (output_bfd, htab->root.splt->output_section);
6802 osi.sec = htab->root.splt;
6804 elf_link_hash_traverse (&htab->root, elfNN_aarch64_output_plt_map,
6869 struct elf_aarch64_link_hash_table *htab;
6878 htab = elf_aarch64_hash_table (info);
6879 htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss");
6881 htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss");
6883 if (!htab->sdynbss || (!info->shared && !htab->srelbss))
6897 struct elf_aarch64_link_hash_table *htab;
6918 htab = elf_aarch64_hash_table (info);
6925 else if (htab->root.dynamic_sections_created && h->plt.refcount > 0)
6937 asection *s = htab->root.splt;
6942 s->size += htab->plt_header_size;
6964 htab->root.sgotplt->size += GOT_ENTRY_SIZE;
6967 htab->root.srelplt->size += RELOC_SIZE (htab);
6982 htab->root.srelplt->reloc_count++;
7006 dyn = htab->root.dynamic_sections_created;
7021 h->got.offset = htab->root.sgot->size;
7022 htab->root.sgot->size += GOT_ENTRY_SIZE;
7028 htab->root.srelgot->size += RELOC_SIZE (htab);
7037 (htab->root.sgotplt->size
7038 - aarch64_compute_jump_table_size (htab));
7039 htab->root.sgotplt->size += GOT_ENTRY_SIZE * 2;
7045 h->got.offset = htab->root.sgot->size;
7046 htab->root.sgot->size += GOT_ENTRY_SIZE * 2;
7051 h->got.offset = htab->root.sgot->size;
7052 htab->root.sgot->size += GOT_ENTRY_SIZE;
7064 htab->root.srelplt->size += RELOC_SIZE (htab);
7070 htab->tlsdesc_plt = (bfd_vma) - 1;
7074 htab->root.srelgot->size += RELOC_SIZE (htab) * 2;
7077 htab->root.srelgot->size += RELOC_SIZE (htab);
7143 || (htab->root.dynamic_sections_created
7174 sreloc->size += p->count * RELOC_SIZE (htab);
7188 struct elf_aarch64_link_hash_table *htab;
7208 htab = elf_aarch64_hash_table (info);
7218 htab->plt_entry_size,
7219 htab->plt_header_size,
7268 struct elf_aarch64_link_hash_table *htab;
7274 htab = elf_aarch64_hash_table ((info));
7275 dynobj = htab->root.dynobj;
7279 if (htab->root.dynamic_sections_created)
7321 srel->size += p->count * RELOC_SIZE (htab);
7333 srel = htab->root.srelgot;
7344 (htab->root.sgotplt->size
7345 - aarch64_compute_jump_table_size (htab));
7346 htab->root.sgotplt->size += GOT_ENTRY_SIZE * 2;
7352 locals[i].got_offset = htab->root.sgot->size;
7353 htab->root.sgot->size += GOT_ENTRY_SIZE * 2;
7358 locals[i].got_offset = htab->root.sgot->size;
7359 htab->root.sgot->size += GOT_ENTRY_SIZE;
7374 htab->root.srelplt->size += RELOC_SIZE (htab);
7376 htab->tlsdesc_plt = (bfd_vma) - 1;
7380 htab->root.srelgot->size += RELOC_SIZE (htab) * 2;
7383 htab->root.srelgot->size += RELOC_SIZE (htab);
7396 elf_link_hash_traverse (&htab->root, elfNN_aarch64_allocate_dynrelocs,
7401 elf_link_hash_traverse (&htab->root, elfNN_aarch64_allocate_ifunc_dynrelocs,
7405 htab_traverse (htab->loc_hash_table,
7410 htab_traverse (htab->loc_hash_table,
7420 if (htab->root.srelplt)
7421 htab->sgotplt_jump_table_size = aarch64_compute_jump_table_size (htab);
7423 if (htab->tlsdesc_plt)
7425 if (htab->root.splt->size == 0)
7426 htab->root.splt->size += PLT_ENTRY_SIZE;
7428 htab->tlsdesc_plt = htab->root.splt->size;
7429 htab->root.splt->size += PLT_TLSDESC_ENTRY_SIZE;
7435 htab->dt_tlsdesc_got = htab->root.sgot->size;
7436 htab->root.sgot->size += GOT_ENTRY_SIZE;
7442 if (htab->fix_erratum_835769 || htab->fix_erratum_843419)
7458 if (s == htab->root.splt
7459 || s == htab->root.sgot
7460 || s == htab->root.sgotplt
7461 || s == htab->root.iplt
7462 || s == htab->root.igotplt || s == htab->sdynbss)
7469 if (s->size != 0 && s != htab->root.srelplt)
7474 if (s != htab->root.srelplt)
7512 if (htab->root.dynamic_sections_created)
7528 if (htab->root.splt->size != 0)
7536 if (htab->tlsdesc_plt
7546 || !add_dynamic_entry (DT_RELAENT, RELOC_SIZE (htab)))
7576 *htab, bfd *output_bfd,
7590 if (htab->root.splt != NULL)
7592 plt = htab->root.splt;
7593 gotplt = htab->root.sgotplt;
7594 relplt = htab->root.srelplt;
7598 plt = htab->root.iplt;
7599 gotplt = htab->root.igotplt;
7600 relplt = htab->root.irelplt;
7614 if (plt == htab->root.splt)
7616 plt_index = (h->plt.offset - htab->plt_header_size) / htab->plt_entry_size;
7621 plt_index = h->plt.offset / htab->plt_entry_size;
7681 loc = relplt->contents + plt_index * RELOC_SIZE (htab);
7736 struct elf_aarch64_link_hash_table *htab;
7737 htab = elf_aarch64_hash_table (info);
7748 if (htab->root.splt != NULL)
7750 plt = htab->root.splt;
7751 gotplt = htab->root.sgotplt;
7752 relplt = htab->root.srelplt;
7756 plt = htab->root.iplt;
7757 gotplt = htab->root.igotplt;
7758 relplt = htab->root.irelplt;
7772 elfNN_aarch64_create_small_pltn_entry (h, htab, output_bfd, info);
7792 if (htab->root.sgot == NULL || htab->root.srelgot == NULL)
7795 rela.r_offset = (htab->root.sgot->output_section->vma
7796 + htab->root.sgot->output_offset
7817 plt = htab->root.splt ? htab->root.splt : htab->root.iplt;
7821 htab->root.sgot->contents
7842 htab->root.sgot->contents + h->got.offset);
7847 loc = htab->root.srelgot->contents;
7848 loc += htab->root.srelgot->reloc_count++ * RELOC_SIZE (htab);
7862 || htab->srelbss == NULL)
7870 loc = htab->srelbss->contents;
7871 loc += htab->srelbss->reloc_count++ * RELOC_SIZE (htab);
7903 *htab)
7924 memcpy (htab->root.splt->contents, elfNN_aarch64_small_plt0_entry,
7926 elf_section_data (htab->root.splt->output_section)->this_hdr.sh_entsize =
7929 plt_got_2nd_ent = (htab->root.sgotplt->output_section->vma
7930 + htab->root.sgotplt->output_offset
7933 plt_base = htab->root.splt->output_section->vma +
7934 htab->root.splt->output_offset;
7939 htab->root.splt->contents + 4,
7943 htab->root.splt->contents + 8,
7947 htab->root.splt->contents + 12,
7955 struct elf_aarch64_link_hash_table *htab;
7959 htab = elf_aarch64_hash_table (info);
7960 dynobj = htab->root.dynobj;
7963 if (htab->root.dynamic_sections_created)
7967 if (sdyn == NULL || htab->root.sgot == NULL)
7985 s = htab->root.sgotplt;
7990 dyn.d_un.d_ptr = htab->root.srelplt->output_section->vma;
7994 s = htab->root.srelplt;
8006 if (htab->root.srelplt != NULL)
8008 s = htab->root.srelplt;
8014 s = htab->root.splt;
8016 + htab->tlsdesc_plt;
8020 s = htab->root.sgot;
8022 + htab->dt_tlsdesc_got;
8032 if (htab->root.splt && htab->root.splt->size > 0)
8034 elfNN_aarch64_init_small_plt0_entry (output_bfd, htab);
8036 elf_section_data (htab->root.splt->output_section)->
8037 this_hdr.sh_entsize = htab->plt_entry_size;
8040 if (htab->tlsdesc_plt)
8043 htab->root.sgot->contents + htab->dt_tlsdesc_got);
8045 memcpy (htab->root.splt->contents + htab->tlsdesc_plt,
8051 htab->root.splt->output_section->vma
8052 + htab->root.splt->output_offset + htab->tlsdesc_plt + 4;
8057 htab->root.sgot->output_section->vma
8058 + htab->root.sgot->output_offset;
8061 htab->root.sgotplt->output_section->vma
8062 + htab->root.sgotplt->output_offset;
8064 bfd_vma dt_tlsdesc_got = got_addr + htab->dt_tlsdesc_got;
8067 htab->root.splt->contents + htab->tlsdesc_plt;
8098 if (htab->root.sgotplt)
8100 if (bfd_is_abs_section (htab->root.sgotplt->output_section))
8103 (_("discarded output section: `%A'"), htab->root.sgotplt);
8108 if (htab->root.sgotplt->size > 0)
8110 bfd_put_NN (output_bfd, (bfd_vma) 0, htab->root.sgotplt->contents);
8115 htab->root.sgotplt->contents + GOT_ENTRY_SIZE);
8118 htab->root.sgotplt->contents + GOT_ENTRY_SIZE * 2);
8121 if (htab->root.sgot)
8123 if (htab->root.sgot->size > 0)
8127 bfd_put_NN (output_bfd, addr, htab->root.sgot->contents);
8131 elf_section_data (htab->root.sgotplt->output_section)->
8135 if (htab->root.sgot && htab->root.sgot->size > 0)
8136 elf_section_data (htab->root.sgot->output_section)->this_hdr.sh_entsize
8140 htab_traverse (htab->loc_hash_table,