Lines Matching refs:elf
740 struct elf_link_hash_entry elf; member
811 struct elf_link_hash_table elf; member
866 ((htab)->elf.srelplt->reloc_count * GOT_ENTRY_SIZE)
942 e.elf.indx = sec->id; in elf_x86_64_get_local_sym_hash()
943 e.elf.dynstr_index = htab->r_sym (rel->r_info); in elf_x86_64_get_local_sym_hash()
953 return &ret->elf; in elf_x86_64_get_local_sym_hash()
962 ret->elf.indx = sec->id; in elf_x86_64_get_local_sym_hash()
963 ret->elf.dynstr_index = htab->r_sym (rel->r_info); in elf_x86_64_get_local_sym_hash()
964 ret->elf.dynindx = -1; in elf_x86_64_get_local_sym_hash()
967 return &ret->elf; in elf_x86_64_get_local_sym_hash()
997 if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, in elf_x86_64_link_hash_table_create()
1033 ret->elf.root.hash_table_free = elf_x86_64_link_hash_table_free; in elf_x86_64_link_hash_table_create()
1035 return &ret->elf.root; in elf_x86_64_link_hash_table_create()
1065 && htab->elf.splt != NULL) in elf_x86_64_create_dynamic_sections()
1659 if (htab->elf.dynobj == NULL) in elf_x86_64_check_relocs()
1660 htab->elf.dynobj = abfd; in elf_x86_64_check_relocs()
1662 = bfd_make_section_anyway_with_flags (htab->elf.dynobj, in elf_x86_64_check_relocs()
1670 || !bfd_set_section_alignment (htab->elf.dynobj, in elf_x86_64_check_relocs()
1685 if (htab->elf.dynobj == NULL) in elf_x86_64_check_relocs()
1686 htab->elf.dynobj = abfd; in elf_x86_64_check_relocs()
1687 if (!_bfd_elf_create_ifunc_sections (htab->elf.dynobj, info)) in elf_x86_64_check_relocs()
1826 if (htab->elf.sgot == NULL) in elf_x86_64_check_relocs()
1828 if (htab->elf.dynobj == NULL) in elf_x86_64_check_relocs()
1829 htab->elf.dynobj = abfd; in elf_x86_64_check_relocs()
1830 if (!_bfd_elf_create_got_section (htab->elf.dynobj, in elf_x86_64_check_relocs()
1966 if (htab->elf.dynobj == NULL) in elf_x86_64_check_relocs()
1967 htab->elf.dynobj = abfd; in elf_x86_64_check_relocs()
1970 (sec, htab->elf.dynobj, ABI_64_P (abfd) ? 3 : 2, in elf_x86_64_check_relocs()
2012 bfd_alloc (htab->elf.dynobj, amt)); in elf_x86_64_check_relocs()
2450 else if (htab->elf.dynamic_sections_created in elf_x86_64_allocate_dynrelocs()
2465 asection *s = htab->elf.splt; in elf_x86_64_allocate_dynrelocs()
2510 htab->elf.sgotplt->size += GOT_ENTRY_SIZE; in elf_x86_64_allocate_dynrelocs()
2513 htab->elf.srelplt->size += bed->s->sizeof_rela; in elf_x86_64_allocate_dynrelocs()
2514 htab->elf.srelplt->reloc_count++; in elf_x86_64_allocate_dynrelocs()
2556 eh->tlsdesc_got = htab->elf.sgotplt->size in elf_x86_64_allocate_dynrelocs()
2558 htab->elf.sgotplt->size += 2 * GOT_ENTRY_SIZE; in elf_x86_64_allocate_dynrelocs()
2564 s = htab->elf.sgot; in elf_x86_64_allocate_dynrelocs()
2570 dyn = htab->elf.dynamic_sections_created; in elf_x86_64_allocate_dynrelocs()
2576 htab->elf.srelgot->size += bed->s->sizeof_rela; in elf_x86_64_allocate_dynrelocs()
2578 htab->elf.srelgot->size += 2 * bed->s->sizeof_rela; in elf_x86_64_allocate_dynrelocs()
2584 htab->elf.srelgot->size += bed->s->sizeof_rela; in elf_x86_64_allocate_dynrelocs()
2587 htab->elf.srelplt->size += bed->s->sizeof_rela; in elf_x86_64_allocate_dynrelocs()
2652 || (htab->elf.dynamic_sections_created in elf_x86_64_allocate_dynrelocs()
2846 && h != htab->elf.hdynamic in elf_x86_64_convert_mov_to_lea()
2912 dynobj = htab->elf.dynobj; in elf_x86_64_size_dynamic_sections()
2916 if (htab->elf.dynamic_sections_created) in elf_x86_64_size_dynamic_sections()
2989 s = htab->elf.sgot; in elf_x86_64_size_dynamic_sections()
2990 srel = htab->elf.srelgot; in elf_x86_64_size_dynamic_sections()
2999 *local_tlsdesc_gotent = htab->elf.sgotplt->size in elf_x86_64_size_dynamic_sections()
3001 htab->elf.sgotplt->size += 2 * GOT_ENTRY_SIZE; in elf_x86_64_size_dynamic_sections()
3018 htab->elf.srelplt->size in elf_x86_64_size_dynamic_sections()
3036 htab->tls_ld_got.offset = htab->elf.sgot->size; in elf_x86_64_size_dynamic_sections()
3037 htab->elf.sgot->size += 2 * GOT_ENTRY_SIZE; in elf_x86_64_size_dynamic_sections()
3038 htab->elf.srelgot->size += bed->s->sizeof_rela; in elf_x86_64_size_dynamic_sections()
3045 elf_link_hash_traverse (&htab->elf, elf_x86_64_allocate_dynrelocs, in elf_x86_64_size_dynamic_sections()
3061 if (htab->elf.srelplt) in elf_x86_64_size_dynamic_sections()
3065 htab->next_irelative_index = htab->elf.srelplt->reloc_count - 1; in elf_x86_64_size_dynamic_sections()
3067 else if (htab->elf.irelplt) in elf_x86_64_size_dynamic_sections()
3068 htab->next_irelative_index = htab->elf.irelplt->reloc_count - 1; in elf_x86_64_size_dynamic_sections()
3078 htab->tlsdesc_got = htab->elf.sgot->size; in elf_x86_64_size_dynamic_sections()
3079 htab->elf.sgot->size += GOT_ENTRY_SIZE; in elf_x86_64_size_dynamic_sections()
3082 if (htab->elf.splt->size == 0) in elf_x86_64_size_dynamic_sections()
3083 htab->elf.splt->size += GET_PLT_ENTRY_SIZE (output_bfd); in elf_x86_64_size_dynamic_sections()
3084 htab->tlsdesc_plt = htab->elf.splt->size; in elf_x86_64_size_dynamic_sections()
3085 htab->elf.splt->size += GET_PLT_ENTRY_SIZE (output_bfd); in elf_x86_64_size_dynamic_sections()
3089 if (htab->elf.sgotplt) in elf_x86_64_size_dynamic_sections()
3093 if ((htab->elf.hgot == NULL in elf_x86_64_size_dynamic_sections()
3094 || !htab->elf.hgot->ref_regular_nonweak) in elf_x86_64_size_dynamic_sections()
3095 && (htab->elf.sgotplt->size in elf_x86_64_size_dynamic_sections()
3097 && (htab->elf.splt == NULL in elf_x86_64_size_dynamic_sections()
3098 || htab->elf.splt->size == 0) in elf_x86_64_size_dynamic_sections()
3099 && (htab->elf.sgot == NULL in elf_x86_64_size_dynamic_sections()
3100 || htab->elf.sgot->size == 0) in elf_x86_64_size_dynamic_sections()
3101 && (htab->elf.iplt == NULL in elf_x86_64_size_dynamic_sections()
3102 || htab->elf.iplt->size == 0) in elf_x86_64_size_dynamic_sections()
3103 && (htab->elf.igotplt == NULL in elf_x86_64_size_dynamic_sections()
3104 || htab->elf.igotplt->size == 0)) in elf_x86_64_size_dynamic_sections()
3105 htab->elf.sgotplt->size = 0; in elf_x86_64_size_dynamic_sections()
3109 && htab->elf.splt != NULL in elf_x86_64_size_dynamic_sections()
3110 && htab->elf.splt->size != 0 in elf_x86_64_size_dynamic_sections()
3111 && !bfd_is_abs_section (htab->elf.splt->output_section) in elf_x86_64_size_dynamic_sections()
3127 if (s == htab->elf.splt in elf_x86_64_size_dynamic_sections()
3128 || s == htab->elf.sgot in elf_x86_64_size_dynamic_sections()
3129 || s == htab->elf.sgotplt in elf_x86_64_size_dynamic_sections()
3130 || s == htab->elf.iplt in elf_x86_64_size_dynamic_sections()
3131 || s == htab->elf.igotplt in elf_x86_64_size_dynamic_sections()
3141 if (s->size != 0 && s != htab->elf.srelplt) in elf_x86_64_size_dynamic_sections()
3146 if (s != htab->elf.srelplt) in elf_x86_64_size_dynamic_sections()
3192 bfd_put_32 (dynobj, htab->elf.splt->size, in elf_x86_64_size_dynamic_sections()
3196 if (htab->elf.dynamic_sections_created) in elf_x86_64_size_dynamic_sections()
3212 if (htab->elf.splt->size != 0) in elf_x86_64_size_dynamic_sections()
3236 elf_link_hash_traverse (&htab->elf, in elf_x86_64_size_dynamic_sections()
3317 base->u.def.value = htab->elf.tls_size; in elf_x86_64_set_tls_module_base()
3523 if (htab->elf.splt != NULL) in elf_x86_64_relocate_section()
3532 resolved_plt = htab->elf.splt; in elf_x86_64_relocate_section()
3538 resolved_plt = htab->elf.iplt; in elf_x86_64_relocate_section()
3623 sreloc = htab->elf.irelifunc; in elf_x86_64_relocate_section()
3643 base_got = htab->elf.sgot; in elf_x86_64_relocate_section()
3655 if (htab->elf.splt != NULL) in elf_x86_64_relocate_section()
3659 base_got = htab->elf.sgotplt; in elf_x86_64_relocate_section()
3665 base_got = htab->elf.igotplt; in elf_x86_64_relocate_section()
3714 base_got = htab->elf.sgot; in elf_x86_64_relocate_section()
3716 if (htab->elf.sgot == NULL) in elf_x86_64_relocate_section()
3734 base_got = htab->elf.sgotplt; in elf_x86_64_relocate_section()
3737 dyn = htab->elf.dynamic_sections_created; in elf_x86_64_relocate_section()
3794 s = htab->elf.srelgot; in elf_x86_64_relocate_section()
3816 relocation -= htab->elf.sgotplt->output_section->vma in elf_x86_64_relocate_section()
3817 - htab->elf.sgotplt->output_offset; in elf_x86_64_relocate_section()
3847 relocation -= htab->elf.sgotplt->output_section->vma in elf_x86_64_relocate_section()
3848 + htab->elf.sgotplt->output_offset; in elf_x86_64_relocate_section()
3854 relocation = htab->elf.sgotplt->output_section->vma in elf_x86_64_relocate_section()
3855 + htab->elf.sgotplt->output_offset; in elf_x86_64_relocate_section()
3865 && htab->elf.splt != NULL) in elf_x86_64_relocate_section()
3874 resolved_plt = htab->elf.splt; in elf_x86_64_relocate_section()
3884 relocation -= htab->elf.sgotplt->output_section->vma in elf_x86_64_relocate_section()
3885 + htab->elf.sgotplt->output_offset; in elf_x86_64_relocate_section()
3899 || htab->elf.splt == NULL) in elf_x86_64_relocate_section()
3914 resolved_plt = htab->elf.splt; in elf_x86_64_relocate_section()
4133 asection *oi = htab->elf.text_index_section; in elf_x86_64_relocate_section()
4347 if (htab->elf.sgot == NULL) in elf_x86_64_relocate_section()
4372 if (htab->elf.srelgot == NULL) in elf_x86_64_relocate_section()
4381 + 2 * GOT_ENTRY_SIZE <= htab->elf.sgotplt->size); in elf_x86_64_relocate_section()
4382 outrel.r_offset = (htab->elf.sgotplt->output_section->vma in elf_x86_64_relocate_section()
4383 + htab->elf.sgotplt->output_offset in elf_x86_64_relocate_section()
4386 sreloc = htab->elf.srelplt; in elf_x86_64_relocate_section()
4394 sreloc = htab->elf.srelgot; in elf_x86_64_relocate_section()
4396 outrel.r_offset = (htab->elf.sgot->output_section->vma in elf_x86_64_relocate_section()
4397 + htab->elf.sgot->output_offset + off); in elf_x86_64_relocate_section()
4406 bfd_put_64 (output_bfd, 0, htab->elf.sgot->contents + off); in elf_x86_64_relocate_section()
4422 htab->elf.sgot->contents + off + GOT_ENTRY_SIZE); in elf_x86_64_relocate_section()
4427 htab->elf.sgot->contents + off + GOT_ENTRY_SIZE); in elf_x86_64_relocate_section()
4450 relocation = htab->elf.sgotplt->output_section->vma in elf_x86_64_relocate_section()
4451 + htab->elf.sgotplt->output_offset in elf_x86_64_relocate_section()
4454 relocation = htab->elf.sgot->output_section->vma in elf_x86_64_relocate_section()
4455 + htab->elf.sgot->output_offset + off; in elf_x86_64_relocate_section()
4503 relocation = (htab->elf.sgot->output_section->vma in elf_x86_64_relocate_section()
4504 + htab->elf.sgot->output_offset + off in elf_x86_64_relocate_section()
4532 htab->elf.sgot->output_section->vma in elf_x86_64_relocate_section()
4533 + htab->elf.sgot->output_offset + off in elf_x86_64_relocate_section()
4601 if (htab->elf.sgot == NULL) in elf_x86_64_relocate_section()
4611 if (htab->elf.srelgot == NULL) in elf_x86_64_relocate_section()
4614 outrel.r_offset = (htab->elf.sgot->output_section->vma in elf_x86_64_relocate_section()
4615 + htab->elf.sgot->output_offset + off); in elf_x86_64_relocate_section()
4618 htab->elf.sgot->contents + off); in elf_x86_64_relocate_section()
4620 htab->elf.sgot->contents + off + GOT_ENTRY_SIZE); in elf_x86_64_relocate_section()
4623 elf_append_rela (output_bfd, htab->elf.srelgot, in elf_x86_64_relocate_section()
4627 relocation = htab->elf.sgot->output_section->vma in elf_x86_64_relocate_section()
4628 + htab->elf.sgot->output_offset + off; in elf_x86_64_relocate_section()
4737 use_plt_bnd = htab->elf.splt != NULL && htab->plt_bnd != NULL; in elf_x86_64_finish_dynamic_symbol()
4754 if (htab->elf.splt != NULL) in elf_x86_64_finish_dynamic_symbol()
4756 plt = htab->elf.splt; in elf_x86_64_finish_dynamic_symbol()
4757 gotplt = htab->elf.sgotplt; in elf_x86_64_finish_dynamic_symbol()
4758 relplt = htab->elf.srelplt; in elf_x86_64_finish_dynamic_symbol()
4762 plt = htab->elf.iplt; in elf_x86_64_finish_dynamic_symbol()
4763 gotplt = htab->elf.igotplt; in elf_x86_64_finish_dynamic_symbol()
4764 relplt = htab->elf.irelplt; in elf_x86_64_finish_dynamic_symbol()
4789 if (plt == htab->elf.splt) in elf_x86_64_finish_dynamic_symbol()
4899 if (plt == htab->elf.splt) in elf_x86_64_finish_dynamic_symbol()
4937 if (htab->elf.sgot == NULL || htab->elf.srelgot == NULL) in elf_x86_64_finish_dynamic_symbol()
4940 rela.r_offset = (htab->elf.sgot->output_section->vma in elf_x86_64_finish_dynamic_symbol()
4941 + htab->elf.sgot->output_offset in elf_x86_64_finish_dynamic_symbol()
4967 plt = htab->elf.splt ? htab->elf.splt : htab->elf.iplt; in elf_x86_64_finish_dynamic_symbol()
4971 htab->elf.sgot->contents + h->got.offset); in elf_x86_64_finish_dynamic_symbol()
4991 htab->elf.sgot->contents + h->got.offset); in elf_x86_64_finish_dynamic_symbol()
4996 elf_append_rela (output_bfd, htab->elf.srelgot, &rela); in elf_x86_64_finish_dynamic_symbol()
5076 abed = (htab->elf.splt != NULL && htab->plt_bnd != NULL in elf_x86_64_finish_dynamic_sections()
5080 dynobj = htab->elf.dynobj; in elf_x86_64_finish_dynamic_sections()
5083 if (htab->elf.dynamic_sections_created) in elf_x86_64_finish_dynamic_sections()
5089 if (sdyn == NULL || htab->elf.sgot == NULL) in elf_x86_64_finish_dynamic_sections()
5109 s = htab->elf.sgotplt; in elf_x86_64_finish_dynamic_sections()
5114 dyn.d_un.d_ptr = htab->elf.srelplt->output_section->vma; in elf_x86_64_finish_dynamic_sections()
5118 s = htab->elf.srelplt->output_section; in elf_x86_64_finish_dynamic_sections()
5130 if (htab->elf.srelplt != NULL) in elf_x86_64_finish_dynamic_sections()
5132 s = htab->elf.srelplt->output_section; in elf_x86_64_finish_dynamic_sections()
5138 s = htab->elf.splt; in elf_x86_64_finish_dynamic_sections()
5144 s = htab->elf.sgot; in elf_x86_64_finish_dynamic_sections()
5154 if (htab->elf.splt && htab->elf.splt->size > 0) in elf_x86_64_finish_dynamic_sections()
5157 memcpy (htab->elf.splt->contents, in elf_x86_64_finish_dynamic_sections()
5162 (htab->elf.sgotplt->output_section->vma in elf_x86_64_finish_dynamic_sections()
5163 + htab->elf.sgotplt->output_offset in elf_x86_64_finish_dynamic_sections()
5165 - htab->elf.splt->output_section->vma in elf_x86_64_finish_dynamic_sections()
5166 - htab->elf.splt->output_offset in elf_x86_64_finish_dynamic_sections()
5168 htab->elf.splt->contents + abed->plt0_got1_offset); in elf_x86_64_finish_dynamic_sections()
5172 (htab->elf.sgotplt->output_section->vma in elf_x86_64_finish_dynamic_sections()
5173 + htab->elf.sgotplt->output_offset in elf_x86_64_finish_dynamic_sections()
5175 - htab->elf.splt->output_section->vma in elf_x86_64_finish_dynamic_sections()
5176 - htab->elf.splt->output_offset in elf_x86_64_finish_dynamic_sections()
5178 htab->elf.splt->contents + abed->plt0_got2_offset); in elf_x86_64_finish_dynamic_sections()
5180 elf_section_data (htab->elf.splt->output_section) in elf_x86_64_finish_dynamic_sections()
5186 htab->elf.sgot->contents + htab->tlsdesc_got); in elf_x86_64_finish_dynamic_sections()
5188 memcpy (htab->elf.splt->contents + htab->tlsdesc_plt, in elf_x86_64_finish_dynamic_sections()
5194 (htab->elf.sgotplt->output_section->vma in elf_x86_64_finish_dynamic_sections()
5195 + htab->elf.sgotplt->output_offset in elf_x86_64_finish_dynamic_sections()
5197 - htab->elf.splt->output_section->vma in elf_x86_64_finish_dynamic_sections()
5198 - htab->elf.splt->output_offset in elf_x86_64_finish_dynamic_sections()
5201 htab->elf.splt->contents in elf_x86_64_finish_dynamic_sections()
5207 (htab->elf.sgot->output_section->vma in elf_x86_64_finish_dynamic_sections()
5208 + htab->elf.sgot->output_offset in elf_x86_64_finish_dynamic_sections()
5210 - htab->elf.splt->output_section->vma in elf_x86_64_finish_dynamic_sections()
5211 - htab->elf.splt->output_offset in elf_x86_64_finish_dynamic_sections()
5214 htab->elf.splt->contents in elf_x86_64_finish_dynamic_sections()
5224 if (htab->elf.sgotplt) in elf_x86_64_finish_dynamic_sections()
5226 if (bfd_is_abs_section (htab->elf.sgotplt->output_section)) in elf_x86_64_finish_dynamic_sections()
5229 (_("discarded output section: `%A'"), htab->elf.sgotplt); in elf_x86_64_finish_dynamic_sections()
5234 if (htab->elf.sgotplt->size > 0) in elf_x86_64_finish_dynamic_sections()
5239 bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents); in elf_x86_64_finish_dynamic_sections()
5243 htab->elf.sgotplt->contents); in elf_x86_64_finish_dynamic_sections()
5245 bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + GOT_ENTRY_SIZE); in elf_x86_64_finish_dynamic_sections()
5246 bfd_put_64 (output_bfd, (bfd_vma) 0, htab->elf.sgotplt->contents + GOT_ENTRY_SIZE*2); in elf_x86_64_finish_dynamic_sections()
5249 elf_section_data (htab->elf.sgotplt->output_section)->this_hdr.sh_entsize = in elf_x86_64_finish_dynamic_sections()
5257 if (htab->elf.splt != NULL in elf_x86_64_finish_dynamic_sections()
5258 && htab->elf.splt->size != 0 in elf_x86_64_finish_dynamic_sections()
5259 && (htab->elf.splt->flags & SEC_EXCLUDE) == 0 in elf_x86_64_finish_dynamic_sections()
5260 && htab->elf.splt->output_section != NULL in elf_x86_64_finish_dynamic_sections()
5263 bfd_vma plt_start = htab->elf.splt->output_section->vma; in elf_x86_64_finish_dynamic_sections()
5280 if (htab->elf.sgot && htab->elf.sgot->size > 0) in elf_x86_64_finish_dynamic_sections()
5281 elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize in elf_x86_64_finish_dynamic_sections()