Lines Matching refs:scninfo
56 struct scninfo *firstp,
72 struct scninfo *scninfo);
77 static void mark_section_used (struct scninfo *scninfo, Elf32_Word shndx,
78 struct scninfo **grpscnp);
140 linked_from_dso_p (struct scninfo *scninfo, int symidx) in linked_from_dso_p() argument
142 struct usedfiles *file = scninfo->fileinfo; in linked_from_dso_p()
600 SCNINFO_SHDR (fileinfo->scninfo[sym->st_shndx].shdr).sh_name); in check_definition()
632 SCNINFO_SHDR (oldfile->scninfo[shndx].shdr).sh_name); in check_definition()
708 struct scninfo *ignore; in check_definition()
709 mark_section_used (&fileinfo->scninfo[sym->st_shndx], in check_definition()
742 static struct scninfo *
746 struct scninfo *runp; in find_section_group()
783 SCNINFO_SHDR (fileinfo->scninfo[shndx].shdr).sh_name)); in find_section_group()
792 struct scninfo **grpscnp) in mark_section_group()
799 struct scninfo *grpscn = find_section_group (fileinfo, shndx, &data); in mark_section_group()
821 XElf_Shdr *shdr = &SCNINFO_SHDR (fileinfo->scninfo[idx].shdr); in mark_section_group()
823 if (fileinfo->scninfo[idx].grpid != 0) in mark_section_group()
829 fileinfo->scninfo[idx].grpid = grpscn->grpid; in mark_section_group()
841 SCNINFO_SHDR (fileinfo->scninfo[shdr->sh_info].shdr).sh_name))))) in mark_section_group()
843 struct scninfo *ignore; in mark_section_group()
845 mark_section_used (&fileinfo->scninfo[idx], idx, &ignore); in mark_section_group()
852 mark_section_used (struct scninfo *scninfo, Elf32_Word shndx, in mark_section_used() argument
853 struct scninfo **grpscnp) in mark_section_used()
855 if (likely (scninfo->used)) in mark_section_used()
860 scninfo->used = true; in mark_section_used()
863 XElf_Shdr *shdr = &SCNINFO_SHDR (scninfo->shdr); in mark_section_used()
865 if (unlikely (scninfo->shdr == NULL)) in mark_section_used()
867 if (unlikely (scninfo->shdr.sh_type == SHT_NULL)) in mark_section_used()
871 shdr = xelf_getshdr (scninfo->scn, scninfo->shdr); in mark_section_used()
873 xelf_getshdr_copy (scninfo->scn, shdr, scninfo->shdr); in mark_section_used()
884 struct scninfo *ignore; in mark_section_used()
885 mark_section_used (&scninfo->fileinfo->scninfo[shdr->sh_link], in mark_section_used()
892 struct scninfo *ignore; in mark_section_used()
893 mark_section_used (&scninfo->fileinfo->scninfo[shdr->sh_info], in mark_section_used()
899 mark_section_group (scninfo->fileinfo, shndx, grpscnp); in mark_section_used()
908 add_section (struct usedfiles *fileinfo, struct scninfo *scninfo) in add_section() argument
913 XElf_Shdr *shdr = &SCNINFO_SHDR (scninfo->shdr); in add_section()
914 struct scninfo *grpscn = NULL; in add_section()
925 if (!scninfo->used in add_section()
935 mark_section_used (scninfo, elf_ndxscn (scninfo->scn), &grpscn); in add_section()
940 grpscn = find_section_group (fileinfo, elf_ndxscn (scninfo->scn), in add_section()
977 scninfo->next = queued->last->next; in add_section()
978 queued->last = queued->last->next = scninfo; in add_section()
997 queued->last = scninfo->next = scninfo; in add_section()
1029 fileinfo->scninfo = (struct scninfo *) in add_relocatable_file()
1030 obstack_calloc (&ld_state.smem, scncnt * sizeof (struct scninfo)); in add_relocatable_file()
1040 fileinfo->scninfo[cnt].scn = elf_getscn (fileinfo->elf, cnt); in add_relocatable_file()
1045 if (fileinfo->scninfo[cnt].shdr == NULL) in add_relocatable_file()
1047 if (fileinfo->scninfo[cnt].shdr.sh_type == SHT_NULL) in add_relocatable_file()
1051 shdr = xelf_getshdr (fileinfo->scninfo[cnt].scn, in add_relocatable_file()
1052 fileinfo->scninfo[cnt].shdr); in add_relocatable_file()
1054 xelf_getshdr_copy (fileinfo->scninfo[cnt].scn, shdr, in add_relocatable_file()
1055 fileinfo->scninfo[cnt].shdr); in add_relocatable_file()
1066 shdr = &SCNINFO_SHDR (fileinfo->scninfo[cnt].shdr); in add_relocatable_file()
1068 Elf_Data *data = elf_getdata (fileinfo->scninfo[cnt].scn, NULL); in add_relocatable_file()
1075 fileinfo->scninfo[cnt].fileinfo = fileinfo; in add_relocatable_file()
1144 fileinfo->dynscn = fileinfo->scninfo[cnt].scn; in add_relocatable_file()
1157 fileinfo->scninfo[cnt].next = fileinfo->groups; in add_relocatable_file()
1158 fileinfo->scninfo[cnt].grpid = cnt; in add_relocatable_file()
1159 fileinfo->groups = &fileinfo->scninfo[cnt]; in add_relocatable_file()
1163 fileinfo->scninfo[cnt].symbols = (struct symbol *) in add_relocatable_file()
1178 struct symbol *symbol = fileinfo->scninfo[cnt].symbols; in add_relocatable_file()
1186 if (fileinfo->scninfo[cnt].symbols->name == NULL) in add_relocatable_file()
1190 elf_ndxscn (fileinfo->scninfo[cnt].scn), in add_relocatable_file()
1198 assert (fileinfo->scninfo[cnt].used == false); in add_relocatable_file()
1225 add_section (fileinfo, &fileinfo->scninfo[cnt]); in add_relocatable_file()
1268 && (SCNINFO_SHDR (fileinfo->scninfo[shndx].shdr).sh_flags in add_relocatable_file()
1283 if (fileinfo->scninfo[shndx].symbols == NULL) in add_relocatable_file()
1284 fileinfo->scninfo[shndx].symbols = newp->next_in_scn in add_relocatable_file()
1289 = fileinfo->scninfo[shndx].symbols->next_in_scn; in add_relocatable_file()
1290 fileinfo->scninfo[shndx].symbols in add_relocatable_file()
1291 = fileinfo->scninfo[shndx].symbols->next_in_scn = newp; in add_relocatable_file()
1447 struct scninfo *ignore; in add_relocatable_file()
1456 mark_section_used (&fileinfo->scninfo[shndx], shndx, &ignore); in add_relocatable_file()
1460 if (SCNINFO_SHDR (fileinfo->scninfo[shndx].shdr).sh_flags in add_relocatable_file()
1463 if (fileinfo->scninfo[shndx].symbols == NULL) in add_relocatable_file()
1464 fileinfo->scninfo[shndx].symbols = newp->next_in_scn in add_relocatable_file()
1469 = fileinfo->scninfo[shndx].symbols->next_in_scn; in add_relocatable_file()
1470 fileinfo->scninfo[shndx].symbols in add_relocatable_file()
1471 = fileinfo->scninfo[shndx].symbols->next_in_scn = newp; in add_relocatable_file()
2557 XElf_Off symalign = MAX (SCNINFO_SHDR (runp->file->scninfo[runp->scndx].shdr).sh_addralign, 1); in compute_copy_reloc_offset()
2620 struct scninfo *prevp; in match_section()
2621 struct scninfo *runp; in match_section()
2622 struct scninfo *notused; in match_section()
2678 struct scninfo *found = runp; in match_section()
2835 struct scninfo *si = (struct scninfo *) in sort_sections_lscript()
2839 struct scninfo *si = (struct scninfo *) obstack_calloc (&ld_state.smem, in sort_sections_lscript()
2865 struct scninfo *si = (struct scninfo *) in sort_sections_lscript()
2869 struct scninfo *si = (struct scninfo *) obstack_calloc (&ld_state.smem, in sort_sections_lscript()
2921 struct scninfo *list = NULL; in ld_generic_create_sections()
2934 struct scninfo *first = list->next; in ld_generic_create_sections()
2981 struct scninfo *runp; in ld_generic_create_sections()
2993 here_groupidx = runp->fileinfo->scninfo[runp->grpid].outscnndx; in ld_generic_create_sections()
3028 = runp->fileinfo->scninfo[runp->grpid].symbols; in ld_generic_create_sections()
3055 if (runp->fileinfo->scninfo[runp->grpid].outscnndx == 0) in ld_generic_create_sections()
3056 runp->fileinfo->scninfo[runp->grpid].outscnndx = here_groupidx; in ld_generic_create_sections()
3058 assert (runp->fileinfo->scninfo[runp->grpid].outscnndx in ld_generic_create_sections()
3652 struct scninfo *scninfo; in ld_generic_create_outfile() member
3783 struct scninfo *runp; in ld_generic_create_outfile()
4068 newp->scninfo = head->last->next; in ld_generic_create_outfile()
4175 locdata = elf_rawdata (file->scninfo[symrunp->scndx].scn, in ld_generic_create_outfile()
4183 file->scninfo[symrunp->scndx].outscnndx = head->scnidx; in ld_generic_create_outfile()
4246 locdata = elf_rawdata (file->scninfo[symrunp->scndx].scn, in ld_generic_create_outfile()
4255 file->scninfo[symrunp->scndx].outscnndx = head->scnidx; in ld_generic_create_outfile()
4325 locdata = elf_rawdata (file->scninfo[symrunp->scndx].scn, in ld_generic_create_outfile()
4334 file->scninfo[symrunp->scndx].outscnndx = head->scnidx; in ld_generic_create_outfile()
4555 assert (file->scninfo[xndx].allsectionsidx in ld_generic_create_outfile()
4557 file->symindirect[cnt] = ld_state.allsections[file->scninfo[xndx].allsectionsidx]->scnsymidx; in ld_generic_create_outfile()
4602 sym->st_value += file->scninfo[xndx].offset; in ld_generic_create_outfile()
4604 assert (file->scninfo[xndx].outscnndx < SHN_LORESERVE in ld_generic_create_outfile()
4605 || file->scninfo[xndx].outscnndx > SHN_HIRESERVE); in ld_generic_create_outfile()
4606 if (unlikely (file->scninfo[xndx].outscnndx > SHN_LORESERVE)) in ld_generic_create_outfile()
4616 xndx = file->scninfo[xndx].outscnndx; in ld_generic_create_outfile()
4623 sym->st_shndx = file->scninfo[xndx].outscnndx; in ld_generic_create_outfile()
5643 struct scninfo *isect; in ld_generic_create_outfile()
5644 struct scninfo *first; in ld_generic_create_outfile()
6141 rellist->scninfo->fileinfo->scninfo[SCNINFO_SHDR (rellist->scninfo->shdr).sh_info].outscnndx; in ld_generic_create_outfile()
6146 RELOCATE_SECTION (statep, outscn, rellist->scninfo, dblindirect); in ld_generic_create_outfile()
6214 struct scninfo *firstp, in ld_generic_relocate_section()
6357 ld_generic_count_relocations (struct ld_state *statep, struct scninfo *scninfo) in ld_generic_count_relocations() argument