Home | History | Annotate | Download | only in bfd

Lines Matching refs:HTAB

34 /* Return the relocation section associated with NAME.  HTAB is the
36 #define RELOC_SECTION(HTAB, NAME) \
37 ((HTAB)->use_rel ? ".rel" NAME : ".rela" NAME)
39 /* Return size of a relocation entry. HTAB is the bfd's
41 #define RELOC_SIZE(HTAB) \
42 ((HTAB)->use_rel \
46 /* Return function to swap relocations in. HTAB is the bfd's
48 #define SWAP_RELOC_IN(HTAB) \
49 ((HTAB)->use_rel \
53 /* Return function to swap relocations out. HTAB is the bfd's
55 #define SWAP_RELOC_OUT(HTAB) \
56 ((HTAB)->use_rel \
3289 #define elf32_arm_compute_jump_table_size(htab) \
3290 ((htab)->next_tls_desc_index * 4)
3728 struct elf32_arm_link_hash_table *htab;
3730 htab = elf32_arm_hash_table (info);
3732 return (!using_thumb_only (htab) && (arm_plt->thumb_refcount != 0
3733 || (!htab->use_blx && arm_plt->maybe_thumb_refcount != 0)));
3819 struct elf32_arm_link_hash_table *htab;
3821 htab = elf32_arm_hash_table (info);
3822 if (htab == NULL)
3829 if (htab->fdpic_p)
3831 htab->srofixup = bfd_make_section_with_flags (dynobj, ".rofixup",
3834 if (htab->srofixup == NULL
3835 || !bfd_set_section_alignment (htab->srofixup, 2))
3847 struct elf32_arm_link_hash_table *htab;
3853 htab = elf32_arm_hash_table (info);
3854 dynobj = htab->root.dynobj;
3858 if (htab->root.iplt == NULL)
3865 htab->root.iplt = s;
3868 if (htab->root.irelplt == NULL)
3871 RELOC_SECTION (htab, ".iplt"),
3876 htab->root.irelplt = s;
3879 if (htab->root.igotplt == NULL)
3885 htab->root.igotplt = s;
3969 struct elf32_arm_link_hash_table *htab;
3971 htab = elf32_arm_hash_table (info);
3972 if (htab == NULL)
3975 if (!htab->root.sgot && !create_got_section (dynobj, info))
3981 if (htab->root.target_os == is_vxworks)
3983 if (!elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2))
3988 htab->plt_header_size = 0;
3989 htab->plt_entry_size
3994 htab->plt_header_size
3996 htab->plt_entry_size
4009 bfd * saved_obfd = htab->obfd;
4011 htab->obfd = dynobj;
4012 if (using_thumb_only (htab))
4014 htab->plt_header_size = 4 * ARRAY_SIZE (elf32_thumb2_plt0_entry);
4015 htab->plt_entry_size = 4 * ARRAY_SIZE (elf32_thumb2_plt_entry);
4017 htab->obfd = saved_obfd;
4020 if (htab->fdpic_p) {
4021 htab->plt_header_size = 0;
4023 htab->plt_entry_size = 4 * (ARRAY_SIZE (elf32_arm_fdpic_plt_entry) - 5);
4025 htab->plt_entry_size = 4 * ARRAY_SIZE (elf32_arm_fdpic_plt_entry);
4028 if (!htab->root.splt
4029 || !htab->root.srelplt
4030 || !htab->root.sdynbss
4031 || (!bfd_link_pic (info) && !htab->root.srelbss))
4592 struct elf32_arm_link_hash_table *htab,
4607 bfd *output_bfd = htab->obfd;
4628 BFD_ASSERT (input_section->id <= htab->top_id);
4629 id_sec = htab->stub_group[input_section->id].link_sec;
4646 stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table,
4727 returns the address of the hash table field in HTAB holding a pointer to the
4731 arm_dedicated_stub_input_section_ptr (struct elf32_arm_link_hash_table *htab,
4740 return &htab->cmse_stub_sec;
4758 struct elf32_arm_link_hash_table *htab,
4769 bfd *output_bfd = htab->obfd;
4773 stub_sec_p = arm_dedicated_stub_input_section_ptr (htab, stub_type);
4786 BFD_ASSERT (section->id <= htab->top_id);
4787 link_sec = htab->stub_group[section->id].link_sec;
4789 stub_sec_p = &htab->stub_group[section->id].stub_sec;
4791 stub_sec_p = &htab->stub_group[link_sec->id].stub_sec;
4794 align = htab->root.target_os == is_nacl ? 4 : 3;
4805 s_name = (char *) bfd_alloc (htab->stub_bfd, len);
4811 *stub_sec_p = (*htab->add_stub_section) (s_name, out_sec, link_sec,
4822 htab->stub_group[section->id].stub_sec = *stub_sec_p;
4835 struct elf32_arm_link_hash_table *htab,
4842 stub_sec = elf32_arm_create_or_find_stub_sec (&link_sec, section, htab,
4848 stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name,
4870 put_arm_insn (struct elf32_arm_link_hash_table * htab,
4873 if (htab->byteswap_code != bfd_little_endian (output_bfd))
4883 put_thumb_insn (struct elf32_arm_link_hash_table * htab,
4886 if (htab->byteswap_code != bfd_little_endian (output_bfd))
4896 put_thumb2_insn (struct elf32_arm_link_hash_table * htab,
4900 if (htab->byteswap_code != bfd_little_endian (output_bfd))
5027 returns the address of the hash table field in HTAB holding the offset at
5031 arm_new_stubs_start_offset_ptr (struct elf32_arm_link_hash_table *htab,
5037 return &htab->new_cmse_stub_offset;
5320 struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
5322 if (htab == NULL)
5339 htab->bfd_count = bfd_count;
5342 htab->stub_group = (struct map_stub *) bfd_zmalloc (amt);
5343 if (htab->stub_group == NULL)
5345 htab->top_id = top_id;
5358 htab->top_index = top_index;
5361 htab->input_list = input_list;
5392 struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
5394 if (htab == NULL)
5397 if (isec->output_section->index <= htab->top_index)
5399 asection **list = htab->input_list + isec->output_section->index;
5404 #define PREV_SEC(sec) (htab->stub_group[(sec)->id].link_sec)
5421 group_sections (struct elf32_arm_link_hash_table *htab,
5425 asection **list = htab->input_list;
5482 htab->stub_group[head->id].link_sec = curr;
5501 htab->stub_group[head->id].link_sec = curr;
5507 while (list++ != htab->input_list + htab->top_index);
5509 free (htab->input_list);
5551 struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
5556 if (htab == NULL)
5669 if (htab->root.splt != NULL && found->hash != NULL
5733 if (htab->use_blx && force_target_arm
5846 found in HTAB. The stub is identified by:
5863 elf32_arm_create_stub (struct elf32_arm_link_hash_table *htab,
5885 BFD_ASSERT (section->id <= htab->top_id);
5888 id_sec = htab->stub_group[section->id].link_sec;
5897 stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name, false,
5908 stub_entry = elf32_arm_add_stub (stub_name, section, htab, stub_type);
5929 bfd_alloc (htab->stub_bfd, sizeof (THUMB2ARM_GLUE_ENTRY_NAME)
5972 entry mapping while HTAB gives the name to hash entry mapping.
5979 cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab,
6065 elf_link_hash_lookup (&(htab)->root, sym_name, false, false, true);
6139 = elf32_arm_create_stub (htab, arm_stub_cmse_branch_thumb_only,
6219 HTAB->in_implib_bfd. A warning is issued for veneers that disappeared
6227 and this function and HTAB->new_cmse_stub_offset is set to the biggest
6232 struct elf32_arm_link_hash_table *htab,
6254 if (!htab->in_implib_bfd)
6257 in_implib_bfd = htab->in_implib_bfd;
6258 if (!htab->cmse_implib)
6282 htab->new_cmse_stub_offset = 0;
6290 bfd_get_section_by_name (htab->obfd, out_sec_name);
6319 stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, sym_name,
6322 elf_link_hash_lookup (&(htab)->root, sym_name, false, false, true);
6333 elf_link_hash_lookup (&(htab)->root, sym_name, true, true, true);
6335 = elf32_arm_create_stub (htab, arm_stub_cmse_branch_thumb_only,
6410 if (next_cmse_stub_offset > htab->new_cmse_stub_offset)
6411 htab->new_cmse_stub_offset = next_cmse_stub_offset;
6420 bfd_hash_traverse (&htab->stub_hash_table, arm_list_new_cmse_stub, info);
6457 struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
6463 if (htab == NULL)
6466 if (htab->fix_cortex_a8)
6480 htab->stub_bfd = stub_bfd;
6481 htab->add_stub_section = add_stub_section;
6482 htab->layout_sections_again = layout_sections_again;
6491 if (htab->fix_cortex_a8)
6513 group_sections (htab, stub_group_size, stubs_always_after_branch);
6522 if (htab->fix_cortex_a8)
6523 (*htab->layout_sections_again) ();
6564 if (!cmse_scan (input_bfd, htab, out_attr, sym_hashes,
6669 BFD_ASSERT (htab->tls_trampoline > 0);
6670 sym_sec = htab->root.splt;
6671 sym_value = htab->tls_trampoline;
6813 elf32_arm_create_stub (htab, stub_type, section, irela,
6830 if (htab->fix_cortex_a8
6874 if (htab->fix_cortex_a8)
6901 && !set_cmse_veneer_addr_from_implib (info, htab,
6913 for (stub_sec = htab->stub_bfd->sections;
6932 start_offset_p = arm_new_stubs_start_offset_ptr (htab, stub_type);
6933 stub_sec_p = arm_dedicated_stub_input_section_ptr (htab, stub_type);
6943 bfd_hash_traverse (&htab->stub_hash_table, arm_size_one_stub, htab);
6951 stub_sec_p = arm_dedicated_stub_input_section_ptr (htab, stub_type);
6965 if (htab->fix_cortex_a8)
6969 a8_fixes[i].section, htab, a8_fixes[i].stub_type);
6981 (*htab->layout_sections_again) ();
6986 if (htab->fix_cortex_a8)
6994 asection *link_sec = htab->stub_group[section_id].link_sec;
6995 asection *stub_sec = htab->stub_group[section_id].stub_sec;
6999 stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name,
7029 htab->a8_erratum_fixes = a8_fixes;
7030 htab->num_a8_erratum_fixes = num_a8_fixes;
7034 htab->a8_erratum_fixes = NULL;
7035 htab->num_a8_erratum_fixes = 0;
7052 struct elf32_arm_link_hash_table *htab;
7054 htab = elf32_arm_hash_table (info);
7055 if (htab == NULL)
7058 for (stub_sec = htab->stub_bfd->sections;
7073 stub_sec->contents = (unsigned char *) bfd_zalloc (htab->stub_bfd, size);
7086 start_offset_p = arm_new_stubs_start_offset_ptr (htab, stub_type);
7087 stub_sec_p = arm_dedicated_stub_input_section_ptr (htab, stub_type);
7097 table = &htab->stub_hash_table;
7099 if (htab->fix_cortex_a8)
7102 htab->fix_cortex_a8 = -1;
9499 struct elf32_arm_link_hash_table *htab;
9501 htab = elf32_arm_hash_table (info);
9502 BFD_ASSERT (htab->root.dynamic_sections_created);
9505 sreloc->size += RELOC_SIZE (htab) * count;
9516 struct elf32_arm_link_hash_table *htab;
9518 htab = elf32_arm_hash_table (info);
9519 if (!htab->root.dynamic_sections_created)
9520 htab->root.irelplt->size += RELOC_SIZE (htab) * count;
9524 sreloc->size += RELOC_SIZE (htab) * count;
9535 struct elf32_arm_link_hash_table *htab;
9537 htab = elf32_arm_hash_table (info);
9538 if (!htab->root.dynamic_sections_created
9540 sreloc = htab->root.irelplt;
9544 loc += sreloc->reloc_count++ * RELOC_SIZE (htab);
9545 if (sreloc->reloc_count * RELOC_SIZE (htab) > sreloc->size)
9547 SWAP_RELOC_OUT (htab) (output_bfd, rel, loc);
9560 struct elf32_arm_link_hash_table *htab;
9564 htab = elf32_arm_hash_table (info);
9568 splt = htab->root.iplt;
9569 sgotplt = htab->root.igotplt;
9572 if (htab->root.target_os == is_nacl && splt->size == 0)
9573 splt->size += htab->plt_header_size;
9576 elf32_arm_allocate_irelocs (info, htab->root.irelplt, 1);
9580 splt = htab->root.splt;
9581 sgotplt = htab->root.sgotplt;
9583 if (htab->fdpic_p)
9590 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
9592 elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
9597 elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
9603 splt->size += htab->plt_header_size;
9605 htab->next_tls_desc_index++;
9612 splt->size += htab->plt_entry_size;
9619 arm_plt->got_offset = sgotplt->size - 8 * htab->num_tls_desc;
9620 if (htab->fdpic_p)
9656 struct elf32_arm_link_hash_table *htab;
9665 htab = elf32_arm_hash_table (info);
9670 splt = htab->root.iplt;
9671 sgot = htab->root.igotplt;
9672 srel = htab->root.irelplt;
9680 splt = htab->root.splt;
9681 sgot = htab->root.sgotplt;
9682 srel = htab->root.srelplt;
9703 if (htab->fdpic_p)
9720 if (htab->root.target_os == is_vxworks && bfd_link_pic (info))
9725 for (i = 0; i != htab->plt_entry_size / 4; i++, ptr += 4)
9731 val |= plt_index * RELOC_SIZE (htab);
9735 put_arm_insn (htab, output_bfd, val, ptr);
9738 else if (htab->root.target_os == is_vxworks)
9743 for (i = 0; i != htab->plt_entry_size / 4; i++, ptr += 4)
9751 val |= plt_index * RELOC_SIZE (htab);
9755 put_arm_insn (htab, output_bfd, val, ptr);
9758 loc = (htab->srelplt2->contents
9759 + (plt_index * 2 + 1) * RELOC_SIZE (htab));
9764 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
9766 SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
9767 loc += RELOC_SIZE (htab);
9772 rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_ARM_ABS32);
9774 SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
9776 else if (htab->root.target_os == is_nacl)
9783 - (plt_address + htab->plt_entry_size + 4));
9794 - (plt_address + htab->plt_entry_size));
9799 put_arm_insn (htab, output_bfd,
9803 put_arm_insn (htab, output_bfd,
9807 put_arm_insn (htab, output_bfd,
9810 put_arm_insn (htab, output_bfd,
9815 else if (htab->fdpic_p)
9817 const bfd_vma *plt_entry = using_thumb_only (htab)
9824 put_thumb_insn (htab, output_bfd,
9826 put_thumb_insn (htab, output_bfd,
9832 put_arm_insn (htab, output_bfd, plt_entry[0], ptr + 0);
9833 put_arm_insn (htab, output_bfd, plt_entry[1], ptr + 4);
9834 put_arm_insn (htab, output_bfd, plt_entry[2], ptr + 8);
9835 put_arm_insn (htab, output_bfd, plt_entry[3], ptr + 12);
9842 htab->root.srelplt->reloc_count * RELOC_SIZE (htab),
9844 put_arm_insn (htab, output_bfd, plt_entry[6], ptr + 24);
9845 put_arm_insn (htab, output_bfd, plt_entry[7], ptr + 28);
9846 put_arm_insn (htab, output_bfd, plt_entry[8], ptr + 32);
9847 put_arm_insn (htab, output_bfd, plt_entry[9], ptr + 36);
9850 else if (using_thumb_only (htab))
9853 if (!using_thumb2 (htab))
9869 put_arm_insn (htab, output_bfd,
9876 put_arm_insn (htab, output_bfd,
9883 put_arm_insn (htab, output_bfd,
9886 put_arm_insn (htab, output_bfd,
9900 put_thumb_insn (htab, output_bfd,
9902 put_thumb_insn (htab, output_bfd,
9910 put_arm_insn (htab, output_bfd,
9914 put_arm_insn (htab, output_bfd,
9918 put_arm_insn (htab, output_bfd,
9928 put_arm_insn (htab, output_bfd,
9932 put_arm_insn (htab, output_bfd,
9936 put_arm_insn (htab, output_bfd,
9940 put_arm_insn (htab, output_bfd,
9962 if (htab->fdpic_p)
9976 if (using_thumb_only (htab))
9985 if (htab->fdpic_p && !(info->flags & DF_BIND_NOW))
10005 if (htab->fdpic_p)
10011 elf32_arm_add_dynreloc (output_bfd, info, htab->root.srelgot, &rel);
10013 elf32_arm_add_dynreloc (output_bfd, info, htab->root.srelplt, &rel);
10017 loc = srel->contents + plt_index * RELOC_SIZE (htab);
10018 SWAP_RELOC_OUT (htab) (output_bfd, &rel, loc);
10067 struct elf_link_hash_table *htab = elf_hash_table (info);
10071 if (htab->tls_sec == NULL)
10073 base = align_power ((bfd_vma) TCB_SIZE, htab->tls_sec->alignment_power);
10074 return address - htab->tls_sec->vma + base;
13827 struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
13829 for (i=0; i<htab->top_id; i++)
13831 sec = htab->stub_group[i].stub_sec;
13833 if (sec && i == htab->stub_group[i].link_sec->id)
15373 struct elf32_arm_link_hash_table *htab;
15384 htab = elf32_arm_hash_table (info);
15385 if (htab == NULL)
15390 if (htab->root.dynobj == NULL)
15391 htab->root.dynobj = abfd;
15395 dynobj = htab->root.dynobj;
15412 r_type = arm_real_reloc_type (htab, r_type);
15432 isym = bfd_sym_from_r_symndx (&htab->root.sym_cache,
15596 htab->tls_ldm_got.refcount++;
15601 if (htab->root.sgot == NULL
15602 && !create_got_section (htab->root.dynobj, info))
15621 if (htab->root.target_os != is_vxworks)
15662 || htab->fdpic_p)
15748 /* It's too early to use htab->use_blx here, so we have to
15768 (sec, dynobj, 2, abfd, ! htab->use_rel);
15790 p = (struct elf_dyn_relocs *) bfd_alloc (htab->root.dynobj, amt);
15803 if (h == NULL && htab->fdpic_p && !bfd_link_pic (info)
16318 struct elf32_arm_link_hash_table *htab;
16328 htab = elf32_arm_hash_table (info);
16329 if (htab == NULL)
16332 if ((htab->root.dynamic_sections_created || h->type == STT_GNU_IFUNC)
16376 h->root.u.def.section = htab->root.splt;
16388 if (htab->root.target_os == is_vxworks && !bfd_link_pic (info))
16392 if (h->plt.offset == htab->plt_header_size)
16393 elf32_arm_allocate_dynrelocs (info, htab->srelplt2, 1);
16398 elf32_arm_allocate_dynrelocs (info, htab->srelplt2, 2);
16425 if (htab->root.dynamic_sections_created
16434 s = htab->root.sgot;
16449 = (htab->root.sgotplt->size
16450 - elf32_arm_compute_jump_table_size (htab));
16451 htab->root.sgotplt->size += 8;
16455 htab->num_tls_desc++;
16474 dyn = htab->root.dynamic_sections_created;
16488 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16491 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16495 elf32_arm_allocate_dynrelocs (info, htab->root.srelplt, 1);
16497 htab->tls_trampoline = -1;
16503 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16505 else if (((indx != -1) || htab->fdpic_p)
16508 if (htab->root.dynamic_sections_created)
16510 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16517 elf32_arm_allocate_irelocs (info, htab->root.srelgot, 1);
16521 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16522 else if (htab->fdpic_p && tls_type == GOT_NORMAL)
16526 htab->srofixup->size += 4;
16542 asection *s = htab->root.sgot;
16548 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16550 htab->srofixup->size += 8;
16556 asection *s = htab->root.sgot;
16558 if (htab->root.dynamic_sections_created && h->dynindx == -1
16575 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16577 htab->srofixup->size += 8;
16586 htab->srofixup->size += 4;
16588 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16593 if (htab->root.dynamic_sections_created && h->dynindx == -1
16604 asection *s = htab->root.sgot;
16611 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
16613 htab->srofixup->size += 8;
16619 htab->srofixup->size += 4 * eh->fdpic_cnts.funcdesc_cnt;
16625 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot,
16631 if (!htab->use_blx && h->dynindx != -1
16673 || htab->fdpic_p)
16696 if (htab->root.target_os == is_vxworks)
16720 else if (htab->root.dynamic_sections_created && h->dynindx == -1
16737 || (htab->root.dynamic_sections_created
16773 else if (htab->fdpic_p && !bfd_link_pic (info))
16774 htab->srofixup->size += 4 * p->count;
16805 struct elf32_arm_link_hash_table *htab;
16807 htab = elf32_arm_hash_table (info);
16808 if (htab == NULL)
16815 check_use_blx (htab);
16862 else if (htab->root.target_os == is_vxworks
16872 if (htab->fdpic_p && !bfd_link_pic (info))
16873 htab->srofixup->size += 4 * p->count;
16894 s = htab->root.sgot;
16895 srel = htab->root.srelgot;
16918 htab->srofixup->size += 8;
16933 htab->srofixup->size += 8;
16940 htab->srofixup->size += 4 * local_fdpic_cnts->funcdesc_cnt;
16987 *local_tlsdesc_gotent = htab->root.sgotplt->size
16988 - elf32_arm_compute_jump_table_size (htab);
16989 htab->root.sgotplt->size += 8;
16993 htab->num_tls_desc++;
17006 isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ibfd,
17018 else if (bfd_link_pic (info) || output_bfd->flags & DYNAMIC || htab->fdpic_p)
17022 else if (htab->fdpic_p && *local_tls_type & GOT_NORMAL)
17023 htab->srofixup->size += 4;
17025 if ((bfd_link_pic (info) || htab->fdpic_p)
17029 htab->root.srelplt, 1);
17030 htab->tls_trampoline = -1;
17039 if (htab->tls_ldm_got.refcount > 0)
17043 htab->tls_ldm_got.offset = htab->root.sgot->size;
17044 htab->root.sgot->size += 8;
17046 elf32_arm_allocate_dynrelocs (info, htab->root.srelgot, 1);
17049 htab->tls_ldm_got.offset = -1;
17053 if (htab->fdpic_p && htab->srofixup != NULL)
17054 htab->srofixup->size += 4;
17058 elf_link_hash_traverse (& htab->root, allocate_dynrelocs_for_symbol, info);
17083 if (htab->root.srelplt)
17084 htab->sgotplt_jump_table_size = elf32_arm_compute_jump_table_size (htab);
17086 if (htab->tls_trampoline)
17088 if (htab->root.splt->size == 0)
17089 htab->root.splt->size += htab->plt_header_size;
17091 htab->tls_trampoline = htab->root.splt->size;
17092 htab->root.splt->size += htab->plt_entry_size;
17097 htab->root.tlsdesc_plt = 0;
17100 htab->root.tlsdesc_got = htab->root.sgot->size;
17101 htab->root.sgot->size += 4;
17103 htab->root.tlsdesc_plt = htab->root.splt->size;
17104 htab->root.splt->size += 4 * ARRAY_SIZE (dl_tlsdesc_lazy_trampoline);
17123 if (s == htab->root.splt)
17134 if (s != htab->root.srelplt && s != htab->srelplt2)
17142 else if (s != htab->root.sgot
17143 && s != htab->root.sgotplt
17144 && s != htab->root.iplt
17145 && s != htab->root.igotplt
17146 && s != htab->root.sdynbss
17147 && s != htab->root.sdynrelro
17148 && s != htab->srofixup)
17189 struct elf32_arm_link_hash_table *htab;
17191 htab = elf32_arm_hash_table (info);
17225 if (htab->fdpic_p && !bfd_link_relocatable (info)
17242 struct elf32_arm_link_hash_table *htab;
17245 htab = elf32_arm_hash_table (info);
17282 (output_bfd, htab->root.iplt->output_section));
17284 + htab->root.iplt->output_section->vma
17285 + htab->root.iplt->output_offset);
17304 if (h->root.u.def.section == htab->root.sdynrelro)
17305 s = htab->root.sreldynrelro;
17307 s = htab->root.srelbss;
17314 if (h == htab->root.hdynamic
17315 || (!htab->fdpic_p
17316 && htab->root.target_os != is_vxworks
17317 && h == htab->root.hgot))
17324 arm_put_trampoline (struct elf32_arm_link_hash_table *htab, bfd *output_bfd,
17335 if (htab->fix_v4bx == 1 && (insn & 0x0ffffff0) == 0x012fff10)
17337 put_arm_insn (htab, output_bfd, insn, (char *)contents + ix*4);
17353 arm_nacl_put_plt0 (struct elf32_arm_link_hash_table *htab, bfd *output_bfd,
17358 put_arm_insn (htab, output_bfd,
17362 put_arm_insn (htab, output_bfd,
17368 put_arm_insn (htab, output_bfd,
17381 struct elf32_arm_link_hash_table *htab;
17383 htab = elf32_arm_hash_table (info);
17384 if (htab == NULL)
17389 sgot = htab->root.sgotplt;
17401 splt = htab->root.splt;
17419 if (htab->root.target_os == is_vxworks
17436 name = RELOC_SECTION (htab, ".plt");
17451 s = htab->root.srelplt;
17464 s = htab->root.splt;
17466 + htab->root.tlsdesc_plt);
17471 s = htab->root.sgot;
17473 + htab->root.tlsdesc_got);
17506 if (splt->size > 0 && htab->plt_header_size)
17515 if (htab->root.target_os == is_vxworks)
17523 put_arm_insn (htab, output_bfd, plt0_entry[0],
17525 put_arm_insn (htab, output_bfd, plt0_entry[1],
17527 put_arm_insn (htab, output_bfd, plt0_entry[2],
17533 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
17535 SWAP_RELOC_OUT (htab) (output_bfd, &rel,
17536 htab->srelplt2->contents);
17538 else if (htab->root.target_os == is_nacl)
17539 arm_nacl_put_plt0 (htab, output_bfd, splt,
17541 else if (using_thumb_only (htab))
17546 put_arm_insn (htab, output_bfd, plt0_entry[0],
17548 put_arm_insn (htab, output_bfd, plt0_entry[1],
17550 put_arm_insn (htab, output_bfd, plt0_entry[2],
17560 put_arm_insn (htab, output_bfd, plt0_entry[0],
17562 put_arm_insn (htab, output_bfd, plt0_entry[1],
17564 put_arm_insn (htab, output_bfd, plt0_entry[2],
17566 put_arm_insn (htab, output_bfd, plt0_entry[3],
17584 if (htab->root.tlsdesc_plt)
17588 bfd_vma gotplt_address = (htab->root.sgot->output_section->vma
17589 + htab->root.sgot->output_offset);
17593 arm_put_trampoline (htab, output_bfd,
17594 splt->contents + htab->root.tlsdesc_plt,
17598 gotplt_address + htab->root.tlsdesc_got
17599 - (plt_address + htab->root.tlsdesc_plt)
17601 splt->contents + htab->root.tlsdesc_plt + 24);
17603 got_address - (plt_address + htab->root.tlsdesc_plt)
17605 splt->contents + htab->root.tlsdesc_plt + 24 + 4);
17608 if (htab->tls_trampoline)
17610 arm_put_trampoline (htab, output_bfd,
17611 splt->contents + htab->tls_trampoline,
17615 splt->contents + htab->tls_trampoline + 12);
17619 if (htab->root.target_os == is_vxworks
17621 && htab->root.splt->size > 0)
17628 num_plts = ((htab->root.splt->size - htab->plt_header_size)
17629 / htab->plt_entry_size);
17630 p = htab->srelplt2->contents + RELOC_SIZE (htab);
17636 SWAP_RELOC_IN (htab) (output_bfd, p, &rel);
17637 rel.r_info = ELF32_R_INFO (htab->root.hgot->indx, R_ARM_ABS32);
17638 SWAP_RELOC_OUT (htab) (output_bfd, &rel, p);
17639 p += RELOC_SIZE (htab);
17641 SWAP_RELOC_IN (htab) (output_bfd, p, &rel);
17642 rel.r_info = ELF32_R_INFO (htab->root.hplt->indx, R_ARM_ABS32);
17643 SWAP_RELOC_OUT (htab) (output_bfd, &rel, p);
17644 p += RELOC_SIZE (htab);
17649 if (htab->root.target_os == is_nacl
17650 && htab->root.iplt != NULL
17651 && htab->root.iplt->size > 0)
17653 arm_nacl_put_plt0 (htabhtab->root.iplt, 0);
17674 if (htab->fdpic_p && htab->srofixup != NULL)
17676 struct elf_link_hash_entry *hgot = htab->root.hgot;
17682 arm_elf_add_rofixup (output_bfd, htab->srofixup, got_value);
17685 BFD_ASSERT (htab->srofixup->reloc_count * 4 == htab->srofixup->size);
17754 struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
17756 if (htab->root.dynsym != NULL
17757 && htab->root.dynsym->contents != NULL)
17768 (htab->root.dynsym->contents
17933 struct elf32_arm_link_hash_table *htab;
17939 htab = elf32_arm_hash_table (osi->info);
17940 if (htab == NULL)
17945 osi->sec = htab->root.iplt;
17950 osi->sec = htab->root.splt;
17951 plt_header_size = htab->plt_header_size;
17957 if (htab->root.target_os == is_vxworks)
17968 else if (htab->root.target_os == is_nacl)
17973 else if (htab->fdpic_p)
17975 enum map_symbol_type type = using_thumb_only (htab)
17986 if (htab->plt_entry_size == 4 * ARRAY_SIZE (elf32_arm_fdpic_plt_entry))
17990 else if (using_thumb_only (htab))
18202 struct elf32_arm_link_hash_table *htab;
18212 htab = elf32_arm_hash_table (info);
18213 if (htab == NULL)
18216 check_use_blx (htab);
18253 if (htab->arm_glue_size > 0)
18255 osi.sec = bfd_get_linker_section (htab->bfd_of_glue_owner,
18261 || htab->pic_veneer)
18263 else if (htab->use_blx)
18268 for (offset = 0; offset < htab->arm_glue_size; offset += size)
18276 if (htab->thumb_glue_size > 0)
18278 osi.sec = bfd_get_linker_section (htab->bfd_of_glue_owner,
18285 for (offset = 0; offset < htab->thumb_glue_size; offset += size)
18293 if (htab->bx_glue_size > 0)
18295 osi.sec = bfd_get_linker_section (htab->bfd_of_glue_owner,
18305 if (htab->stub_bfd && htab->stub_bfd->sections)
18309 for (stub_sec = htab->stub_bfd->sections;
18322 bfd_hash_traverse (&htab->stub_hash_table, arm_map_one_stub, &osi);
18327 if (htab->root.splt && htab->root.splt->size > 0)
18329 osi.sec = htab->root.splt;
18334 if (htab->root.target_os == is_vxworks)
18345 else if (htab->root.target_os == is_nacl)
18350 else if (using_thumb_only (htab) && !htab->fdpic_p)
18359 else if (!htab->fdpic_p)
18369 if (htab->root.target_os == is_nacl
18370 && htab->root.iplt
18371 && htab->root.iplt->size > 0)
18374 osi.sec = htab->root.iplt;
18380 if ((htab->root.splt && htab->root.splt->size > 0)
18381 || (htab->root.iplt && htab->root.iplt->size > 0))
18383 elf_link_hash_traverse (&htab->root, elf32_arm_output_plt_map, &osi);
18413 if (htab->root.tlsdesc_plt != 0)
18417 htab->root.tlsdesc_plt))
18421 htab->root.tlsdesc_plt + 24))
18424 if (htab->tls_trampoline != 0)
18427 if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, htab->tls_trampoline))
18431 htab->tls_trampoline + 12))
18454 struct elf32_arm_link_hash_table *htab;
18456 htab = elf32_arm_hash_table (info);
18457 if (!htab->stub_bfd || !htab->stub_bfd->sections)
18490 elf_link_hash_lookup (&(htab)->root, cmse_name, false, false, true);
18863 push_thumb2_insn32 (struct elf32_arm_link_hash_table * htab,
18866 put_thumb2_insn (htab, output_bfd, insn, pt);
18871 push_thumb2_insn16 (struct elf32_arm_link_hash_table * htab,
18874 put_thumb_insn (htab, output_bfd, insn, pt);
18882 stm32l4xx_fill_stub_udf (struct elf32_arm_link_hash_table * htab,
18898 push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
18903 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
18913 stm32l4xx_create_replacing_stub_ldmia (struct elf32_arm_link_hash_table * htab,
18938 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
18944 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
18950 stm32l4xx_fill_stub_udf (htab, output_bfd,
18992 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
18998 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19005 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19022 push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
19028 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19034 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19042 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19050 stm32l4xx_fill_stub_udf (htab, output_bfd,
19057 stm32l4xx_create_replacing_stub_ldmdb (struct elf32_arm_link_hash_table * htab,
19082 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19087 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19093 stm32l4xx_fill_stub_udf (htab, output_bfd,
19138 push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
19143 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19149 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19155 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19163 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19169 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19175 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19186 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19191 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19197 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19208 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19213 push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
19218 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19224 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19238 push_thumb2_insn16 (htab, output_bfd, current_stub_contents,
19244 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19250 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19256 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19271 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19276 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19282 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19295 stm32l4xx_fill_stub_udf (htab, output_bfd,
19303 stm32l4xx_create_replacing_stub_vldm (struct elf32_arm_link_hash_table * htab,
19321 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19326 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19394 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19403 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19410 push_thumb2_insn32 (htab, output_bfd, current_stub_contents,
19417 stm32l4xx_fill_stub_udf (htab, output_bfd,
19424 stm32l4xx_create_replacing_stub (struct elf32_arm_link_hash_table * htab,
19431 stm32l4xx_create_replacing_stub_ldmia (htab, output_bfd,
19435 stm32l4xx_create_replacing_stub_ldmdb (htab, output_bfd,
19439 stm32l4xx_create_replacing_stub_vldm (htab, output_bfd,
20456 struct elf32_arm_link_hash_table *htab
20459 htab->plt_header_size = 4 * ARRAY_SIZE (elf32_arm_nacl_plt0_entry);
20460 htab->plt_entry_size = 4 * ARRAY_SIZE (elf32_arm_nacl_plt_entry);
20556 struct elf32_arm_link_hash_table *htab = (struct elf32_arm_link_hash_table *) ret;
20558 htab->fdpic_p = 1;
20626 struct elf32_arm_link_hash_table *htab
20628 htab->use_rel = 0;