Lines Matching defs:elf

33 #include "elf-bfd.h"
34 #include "elf/ppc.h"
36 #include "elf-vxworks.h"
1724 struct elf_obj_tdata elf;
2374 struct elf_link_hash_entry elf;
2408 struct elf_link_hash_table elf;
2514 if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd,
2522 ret->elf.init_plt_refcount.refcount = 0;
2523 ret->elf.init_plt_refcount.glist = NULL;
2524 ret->elf.init_plt_offset.offset = 0;
2525 ret->elf.init_plt_offset.glist = NULL;
2539 return &ret->elf.root;
2697 && eind->elf.root.type != bfd_link_hash_indirect
2698 && edir->elf.dynamic_adjusted))
2699 edir->elf.non_got_ref |= eind->elf.non_got_ref;
2701 edir->elf.ref_dynamic |= eind->elf.ref_dynamic;
2702 edir->elf.ref_regular |= eind->elf.ref_regular;
2703 edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
2704 edir->elf.needs_plt |= eind->elf.needs_plt;
2707 if (eind->elf.root.type != bfd_link_hash_indirect)
2712 edir->elf.got.refcount += eind->elf.got.refcount;
2713 eind->elf.got.refcount = 0;
2716 if (eind->elf.plt.plist != NULL)
2718 if (edir->elf.plt.plist != NULL)
2723 for (entp = &eind->elf.plt.plist; (ent = *entp) != NULL; )
2727 for (dent = edir->elf.plt.plist; dent != NULL; dent = dent->next)
2737 *entp = edir->elf.plt.plist;
2740 edir->elf.plt.plist = eind->elf.plt.plist;
2741 eind->elf.plt.plist = NULL;
2744 if (eind->elf.dynindx != -1)
2746 if (edir->elf.dynindx != -1)
2748 edir->elf.dynstr_index);
2749 edir->elf.dynindx = eind->elf.dynindx;
2750 edir->elf.dynstr_index = eind->elf.dynstr_index;
2751 eind->elf.dynindx = -1;
2752 eind->elf.dynstr_index = 0;
2796 if (!htab->elf.dynobj)
2797 htab->elf.dynobj = abfd;
2799 htab->sbss = bfd_make_section_anyway_with_flags (htab->elf.dynobj,
2818 lsect->sym = elf_link_hash_lookup (&htab->elf, lsect->sym_name,
2843 if (!htab->elf.dynobj)
2844 htab->elf.dynobj = abfd;
2846 s = bfd_make_section_anyway_with_flags (htab->elf.dynobj,
2850 || !bfd_set_section_alignment (htab->elf.dynobj, s, 2))
3103 if (htab->elf.dynobj == NULL)
3104 htab->elf.dynobj = abfd;
3105 if (!ppc_elf_create_got (htab->elf.dynobj, info))
3107 BFD_ASSERT (h == htab->elf.hgot);
3154 if (htab->elf.dynobj == NULL)
3155 htab->elf.dynobj = abfd;
3156 if (!ppc_elf_create_got (htab->elf.dynobj, info))
3367 if (h && h == htab->elf.hgot && htab->plt_type == PLT_UNSET)
3430 if (h == NULL || h == htab->elf.hgot)
3440 if (h == htab->elf.hgot)
3533 if (htab->elf.dynobj == NULL)
3534 htab->elf.dynobj = abfd;
3535 sreloc = bfd_get_section_by_name (htab->elf.dynobj, name);
3543 sreloc = bfd_make_section_with_flags (htab->elf.dynobj,
3547 || ! bfd_set_section_alignment (htab->elf.dynobj,
3581 p = bfd_alloc (htab->elf.dynobj, sizeof *p);
3813 && !bfd_set_section_flags (htab->elf.dynobj, htab->plt, flags))
3818 && !bfd_set_section_flags (htab->elf.dynobj, htab->got, flags))
3825 && !bfd_set_section_alignment (htab->elf.dynobj, htab->glink, 0))
3951 if (h == NULL || h == htab->elf.hgot)
4008 htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr",
4228 BFD_ASSERT (htab->elf.dynobj != NULL
4400 sh = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE);
4474 if (htab->elf.dynamic_sections_created)
4618 if (eh->elf.got.refcount > 0)
4621 if (eh->elf.dynindx == -1
4622 && !eh->elf.forced_local)
4624 if (!bfd_elf_link_record_dynamic_symbol (info, &eh->elf))
4629 && !eh->elf.def_dynamic)
4631 eh->elf.got.offset = (bfd_vma) -1;
4649 eh->elf.got.offset = allocate_got (htab, need);
4650 dyn = htab->elf.dynamic_sections_created;
4652 || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, &eh->elf))
4653 && (ELF_ST_VISIBILITY (eh->elf.other) == STV_DEFAULT
4654 || eh->elf.root.type != bfd_link_hash_undefweak))
4665 eh->elf.got.offset = (bfd_vma) -1;
4803 BFD_ASSERT (htab->elf.dynobj != NULL);
4810 s = bfd_get_section_by_name (htab->elf.dynobj, ".interp");
4934 htab->elf.hgot->root.u.def.value = g_o_t;
4949 sh = elf_link_hash_lookup (&htab->elf, "__glink",
4964 sh = elf_link_hash_lookup (&htab->elf, "__glink_PLTresolve",
4985 for (s = htab->elf.dynobj->sections; s != NULL; s = s->next)
5003 if ((s == htab->plt || s == htab->got) && htab->elf.hplt != NULL)
5050 s->contents = bfd_zalloc (htab->elf.dynobj, s->size);
5055 if (htab->elf.dynamic_sections_created)
5583 BFD_ASSERT (eh->elf.def_regular);
5948 rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
6081 dyn = htab->elf.dynamic_sections_created;
6186 outrel.r_addend -= htab->elf.tls_sec->vma;
6204 value -= htab->elf.tls_sec->vma + DTP_OFFSET;
6254 relocation -= htab->elf.hgot->root.u.def.value;
6292 addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
6301 addend -= htab->elf.tls_sec->vma + TP_OFFSET;
6308 addend -= htab->elf.tls_sec->vma + TP_OFFSET;
6312 addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
6334 || h == htab->elf.hgot)
6398 sreloc = bfd_get_section_by_name (htab->elf.dynobj, name);
6451 osec = htab->elf.text_index_section;
6894 BFD_ASSERT (htab->elf.dynobj != NULL);
6948 + htab->elf.hgot->root.u.def.value
6949 + htab->elf.hgot->root.u.def.section->output_offset
6950 + htab->elf.hgot->root.u.def.section->output_section->vma);
7011 rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx,
7021 rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx,
7032 rela.r_info = ELF32_R_INFO (htab->elf.hplt->indx,
7109 else if (htab->elf.hgot != NULL)
7110 got = (htab->elf.hgot->root.u.def.value
7111 + htab->elf.hgot->root.u.def.section->output_section->vma
7112 + htab->elf.hgot->root.u.def.section->output_offset);
7194 && (h == htab->elf.hgot
7247 if (htab->elf.hgot != NULL)
7248 got = (htab->elf.hgot->root.u.def.value
7249 + htab->elf.hgot->root.u.def.section->output_section->vma
7250 + htab->elf.hgot->root.u.def.section->output_offset);
7252 if (htab->elf.dynamic_sections_created)
7314 p += htab->elf.hgot->root.u.def.value;
7337 (htab->elf.hgot->root.u.def.section->output_section->vma
7338 + htab->elf.hgot->root.u.def.section->output_offset
7339 + htab->elf.hgot->root.u.def.value);
7370 rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA);
7379 rela.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO);
7392 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_HA);
7397 rel.r_info = ELF32_R_INFO (htab->elf.hgot->indx, R_PPC_ADDR16_LO);
7402 rel.r_info = ELF32_R_INFO (htab->elf.hplt->indx, R_PPC_ADDR32);
7666 /* VxWorks uses the elf default section flags for .plt. */