Lines Matching refs:finfo

6515   struct elf_final_link_info *finfo;
6550 struct elf_final_link_info * finfo,
6560 sym = finfo->internal_syms + symidx;
6587 struct elf_final_link_info * finfo,
6602 sym = finfo->internal_syms + i;
6603 sec = finfo->sections [i];
6638 global_entry = bfd_link_hash_lookup (finfo->info->hash, name, FALSE, FALSE, TRUE);
6719 struct elf_final_link_info * finfo,
6779 if ((resolve_section (symbuf, finfo->output_bfd->sections, result) != TRUE)
6780 && (resolve_symbol (symbuf, input_bfd, finfo, result, locsymcount) != TRUE))
6788 if ((resolve_symbol (symbuf, input_bfd, finfo, result, locsymcount) != TRUE)
6789 && (resolve_section (symbuf, finfo->output_bfd->sections,
6807 if (eval_symbol (& a, sym, & sym, input_bfd, finfo, addr, \
6825 if (eval_symbol (& a, sym, & sym, input_bfd, finfo, addr, \
6830 if (eval_symbol (& b, sym, & sym, input_bfd, finfo, addr, \
6876 struct elf_final_link_info * finfo,
6889 if (finfo->info->relocatable)
6946 sym = finfo->internal_syms + index;
6988 finfo, addr, section_offset, locsymcount,
6991 set_symbol_value (input_bfd, finfo, index, result);
7626 elf_link_flush_output_syms (struct elf_final_link_info *finfo,
7629 if (finfo->symbuf_count > 0)
7635 hdr = &elf_tdata (finfo->output_bfd)->symtab_hdr;
7637 amt = finfo->symbuf_count * bed->s->sizeof_sym;
7638 if (bfd_seek (finfo->output_bfd, pos, SEEK_SET) != 0
7639 || bfd_bwrite (finfo->symbuf, amt, finfo->output_bfd) != amt)
7643 finfo->symbuf_count = 0;
7652 elf_link_output_sym (struct elf_final_link_info *finfo,
7665 bed = get_elf_backend_data (finfo->output_bfd);
7669 if (! (*output_symbol_hook) (finfo->info, name, elfsym, input_sec, h))
7679 elfsym->st_name = (unsigned long) _bfd_stringtab_add (finfo->symstrtab,
7685 if (finfo->symbuf_count >= finfo->symbuf_size)
7687 if (! elf_link_flush_output_syms (finfo, bed))
7691 dest = finfo->symbuf + finfo->symbuf_count * bed->s->sizeof_sym;
7692 destshndx = finfo->symshndxbuf;
7695 if (bfd_get_symcount (finfo->output_bfd) >= finfo->shndxbuf_size)
7699 amt = finfo->shndxbuf_size * sizeof (Elf_External_Sym_Shndx);
7700 finfo->symshndxbuf = destshndx = bfd_realloc (destshndx, amt * 2);
7704 finfo->shndxbuf_size *= 2;
7706 destshndx += bfd_get_symcount (finfo->output_bfd);
7709 bed->s->swap_symbol_out (finfo->output_bfd, elfsym, dest, destshndx);
7710 finfo->symbuf_count += 1;
7711 bfd_get_symcount (finfo->output_bfd) += 1;
7893 struct elf_final_link_info *finfo = eoinfo->finfo;
7918 bed = get_elf_backend_data (finfo->output_bfd);
7936 && ! elf_link_check_versioned_symbol (finfo->info, bed, h)
7937 && finfo->info->unresolved_syms_in_shared_libs != RM_IGNORE)
7939 if (! (finfo->info->callbacks->undefined_symbol
7940 (finfo->info, h->root.root.string, h->root.u.undef.abfd,
7941 NULL, 0, finfo->info->unresolved_syms_in_shared_libs == RM_GENERATE_ERROR)))
7951 if (! finfo->info->relocatable
7952 && (! finfo->info->shared)
7957 && ! elf_link_check_versioned_symbol (finfo->info, bed, h))
7961 finfo->output_bfd,
7963 ? finfo->output_bfd : h->root.u.def.section->owner,
7985 else if (finfo->info->strip == strip_all)
7987 else if (finfo->info->strip == strip_some
7988 && bfd_hash_lookup (finfo->info->keep_hash,
7991 else if (finfo->info->strip_discarded
8038 _bfd_elf_section_from_bfd_section (finfo->output_bfd,
8044 finfo->output_bfd, input_sec->output_section, input_sec);
8053 if (! finfo->info->relocatable)
8060 BFD_ASSERT (elf_hash_table (finfo->info)->tls_sec != NULL);
8061 sym.st_value -= elf_hash_table (finfo->info)->tls_sec->vma;
8097 && ((finfo->info->shared
8101 && elf_hash_table (finfo->info)->dynamic_sections_created)
8104 (finfo->output_bfd, finfo->info, h, &sym)))
8133 if (! finfo->info->relocatable
8141 finfo->output_bfd,
8155 && elf_hash_table (finfo->info)->dynamic_sections_created)
8160 esym = finfo->dynsym_sec->contents + h->dynindx * bed->s->sizeof_sym;
8161 if (! check_dynsym (finfo->output_bfd, &sym))
8166 bed->s->swap_symbol_out (finfo->output_bfd, &sym, esym, 0);
8168 if (finfo->hash_sec != NULL)
8176 bucketcount = elf_hash_table (finfo->info)->bucketcount;
8180 = elf_section_data (finfo->hash_sec)->this_hdr.sh_entsize;
8181 bucketpos = ((bfd_byte *) finfo->hash_sec->contents
8183 chain = bfd_get (8 * hash_entry_size, finfo->output_bfd, bucketpos);
8184 bfd_put (8 * hash_entry_size, finfo->output_bfd, h->dynindx, bucketpos);
8185 bfd_put (8 * hash_entry_size, finfo->output_bfd, chain,
8186 ((bfd_byte *) finfo->hash_sec->contents
8190 if (finfo->symver_sec != NULL && finfo->symver_sec->contents != NULL)
8208 if (finfo->info->create_default_symver)
8215 eversym = (Elf_External_Versym *) finfo->symver_sec->contents;
8217 _bfd_elf_swap_versym_out (finfo->output_bfd, &iversym, eversym);
8226 h->indx = bfd_get_symcount (finfo->output_bfd);
8228 if (! elf_link_output_sym (finfo, h->root.root.string, &sym, input_sec, h))
8335 elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
8353 output_bfd = finfo->output_bfd;
8380 finfo->internal_syms,
8381 finfo->external_syms,
8382 finfo->locsym_shndx);
8387 finfo->internal_syms. */
8391 finfo->internal_syms,
8392 finfo->external_syms,
8393 finfo->locsym_shndx);
8400 for (isym = isymbuf, pindex = finfo->indices, ppsection = finfo->sections;
8448 if (ppsection == finfo->sections)
8461 if (finfo->info->strip == strip_all)
8469 if (finfo->info->discard == discard_all)
8488 if ((finfo->info->strip == strip_some
8489 && (bfd_hash_lookup (finfo->info->keep_hash, name, FALSE, FALSE)
8491 || (((finfo->info->discard == discard_sec_merge
8492 && (isec->flags & SEC_MERGE) && ! finfo->info->relocatable)
8493 || finfo->info->discard == discard_l)
8517 if (! finfo->info->relocatable)
8523 BFD_ASSERT (elf_hash_table (finfo->info)->tls_sec != NULL);
8524 osym.st_value -= elf_hash_table (finfo->info)->tls_sec->vma;
8528 if (! elf_link_output_sym (finfo, name, &osym, isec, NULL))
8532 if (! evaluate_complex_relocation_symbols (input_bfd, finfo, locsymcount))
8568 contents = finfo->contents;
8582 = _bfd_elf_link_read_relocs (input_bfd, o, finfo->external_relocs,
8583 finfo->internal_relocs, FALSE);
8623 && finfo->sections[r_symndx] == NULL))
8657 ps = &finfo->sections[r_symndx];
8669 (*finfo->info->callbacks->einfo)
8685 finfo->info);
8716 ret = (*relocate_section) (output_bfd, finfo->info,
8720 finfo->sections);
8725 || finfo->info->relocatable
8726 || finfo->info->emitrelocations)
8751 if (!finfo->info->relocatable)
8766 finfo->info, o,
8784 if (!finfo->info->relocatable)
8795 && finfo->sections[r_symndx] == NULL))
8828 sec = finfo->sections[r_symndx];
8868 htab = elf_hash_table (finfo->info);
8892 if (finfo->indices[r_symndx] == -1)
8898 if (finfo->info->strip == strip_all)
8922 if (! finfo->info->relocatable)
8929 BFD_ASSERT (elf_hash_table (finfo->info)
8931 sym.st_value -= (elf_hash_table (finfo->info)
8936 finfo->indices[r_symndx]
8939 if (! elf_link_output_sym (finfo, name, &sym, sec,
8944 r_symndx = finfo->indices[r_symndx];
8976 && (*bed->elf_backend_write_section) (output_bfd, finfo->info, o,
8986 &elf_hash_table (finfo->info)->stab_info,
8997 if (! _bfd_elf_write_section_eh_frame (output_bfd, finfo->info,
9338 struct elf_final_link_info finfo;
9375 finfo.info = info;
9376 finfo.output_bfd = abfd;
9377 finfo.symstrtab = _bfd_elf_stringtab_init ();
9378 if (finfo.symstrtab == NULL)
9383 finfo.dynsym_sec = NULL;
9384 finfo.hash_sec = NULL;
9385 finfo.symver_sec = NULL;
9389 finfo.dynsym_sec = bfd_get_section_by_name (dynobj, ".dynsym");
9390 finfo.hash_sec = bfd_get_section_by_name (dynobj, ".hash");
9391 BFD_ASSERT (finfo.dynsym_sec != NULL);
9392 finfo.symver_sec = bfd_get_section_by_name (dynobj, ".gnu.version");
9396 finfo.contents = NULL;
9397 finfo.external_relocs = NULL;
9398 finfo.internal_relocs = NULL;
9399 finfo.external_syms = NULL;
9400 finfo.locsym_shndx = NULL;
9401 finfo.internal_syms = NULL;
9402 finfo.indices = NULL;
9403 finfo.sections = NULL;
9404 finfo.symbuf = NULL;
9405 finfo.symshndxbuf = NULL;
9406 finfo.symbuf_count = 0;
9407 finfo.shndxbuf_size = 0;
9669 finfo.symbuf_size = 20;
9671 finfo.symbuf_size = max_sym_count;
9672 amt = finfo.symbuf_size;
9674 finfo.symbuf = bfd_malloc (amt);
9675 if (finfo.symbuf == NULL)
9681 finfo.shndxbuf_size = amt;
9683 finfo.symshndxbuf = bfd_zmalloc (amt);
9684 if (finfo.symshndxbuf == NULL)
9698 if (! elf_link_output_sym (&finfo, NULL, &elfsym, bfd_und_section_ptr,
9724 if (!elf_link_output_sym (&finfo, NULL, &elfsym, o, NULL))
9736 finfo.contents = bfd_malloc (max_contents_size);
9737 if (finfo.contents == NULL)
9743 finfo.external_relocs = bfd_malloc (max_external_reloc_size);
9744 if (finfo.external_relocs == NULL)
9752 finfo.internal_relocs = bfd_malloc (amt);
9753 if (finfo.internal_relocs == NULL)
9760 finfo.external_syms = bfd_malloc (amt);
9761 if (finfo.external_syms == NULL)
9765 finfo.internal_syms = bfd_malloc (amt);
9766 if (finfo.internal_syms == NULL)
9770 finfo.indices = bfd_malloc (amt);
9771 if (finfo.indices == NULL)
9775 finfo.sections = bfd_malloc (amt);
9776 if (finfo.sections == NULL)
9783 finfo.locsym_shndx = bfd_malloc (amt);
9784 if (finfo.locsym_shndx == NULL)
9853 if (! elf_link_input_bfd (&finfo, sub))
9891 eoinfo.finfo = &finfo;
9907 (abfd, info, &finfo, (out_sym_func) elf_link_output_sym)))
9920 && finfo.dynsym_sec->output_section != bfd_abs_section_ptr)
9923 bfd_byte *dynsym = finfo.dynsym_sec->contents;
9999 elf_section_data (finfo.dynsym_sec->output_section)->this_hdr.sh_info =
10006 eoinfo.finfo = &finfo;
10021 (abfd, info, &finfo, (out_sym_func) elf_link_output_sym)))
10026 if (! elf_link_flush_output_syms (&finfo, bed))
10045 || (bfd_bwrite (finfo.symshndxbuf, amt, abfd) != amt))
10057 symstrtab_hdr->sh_size = _bfd_stringtab_size (finfo.symstrtab);
10070 || ! _bfd_stringtab_emit (abfd, finfo.symstrtab))
10356 if (finfo.symstrtab != NULL)
10357 _bfd_stringtab_free (finfo.symstrtab);
10358 if (finfo.contents != NULL)
10359 free (finfo.contents);
10360 if (finfo.external_relocs != NULL)
10361 free (finfo.external_relocs);
10362 if (finfo.internal_relocs != NULL)
10363 free (finfo.internal_relocs);
10364 if (finfo.external_syms != NULL)
10365 free (finfo.external_syms);
10366 if (finfo.locsym_shndx != NULL)
10367 free (finfo.locsym_shndx);
10368 if (finfo.internal_syms != NULL)
10369 free (finfo.internal_syms);
10370 if (finfo.indices != NULL)
10371 free (finfo.indices);
10372 if (finfo.sections != NULL)
10373 free (finfo.sections);
10374 if (finfo.symbuf != NULL)
10375 free (finfo.symbuf);
10376 if (finfo.symshndxbuf != NULL)
10377 free (finfo.symshndxbuf);
10400 if (finfo.symstrtab != NULL)
10401 _bfd_stringtab_free (finfo.symstrtab);
10402 if (finfo.contents != NULL)
10403 free (finfo.contents);
10404 if (finfo.external_relocs != NULL)
10405 free (finfo.external_relocs);
10406 if (finfo.internal_relocs != NULL)
10407 free (finfo.internal_relocs);
10408 if (finfo.external_syms != NULL)
10409 free (finfo.external_syms);
10410 if (finfo.locsym_shndx != NULL)
10411 free (finfo.locsym_shndx);
10412 if (finfo.internal_syms != NULL)
10413 free (finfo.internal_syms);
10414 if (finfo.indices != NULL)
10415 free (finfo.indices);
10416 if (finfo.sections != NULL)
10417 free (finfo.sections);
10418 if (finfo.symbuf != NULL)
10419 free (finfo.symbuf);
10420 if (finfo.symshndxbuf != NULL)
10421 free (finfo.symshndxbuf);