Lines Matching refs:part
171 * Read LDS symbols from the given \p section of the ELF of \p part and append
194 struct ac_rtld_part *part = &binary->parts[part_idx];
217 s.name = elf_strptr(part->elf, strtabidx, symbol->st_name);
323 struct ac_rtld_part *part = &binary->parts[part_idx];
327 part->elf = elf_memory((char *)i.elf_ptrs[part_idx], i.elf_sizes[part_idx]);
328 report_elf_if(!part->elf);
330 const Elf64_Ehdr *ehdr = elf64_getehdr(part->elf);
336 report_elf_if(elf_getshdrstrndx(part->elf, §ion_str_index) < 0);
337 report_elf_if(elf_getshdrnum(part->elf, &num_shdrs) < 0);
339 part->num_sections = num_shdrs;
340 part->sections = calloc(sizeof(*part->sections), num_shdrs);
341 report_if(!part->sections);
344 while ((section = elf_nextscn(part->elf, section))) {
346 struct ac_rtld_section *s = &part->sections[elf_ndxscn(section)];
347 s->name = elf_strptr(part->elf, section_str_index, shdr->sh_name);
426 struct ac_rtld_part *part = &binary->parts[part_idx];
428 elf_getshdrnum(part->elf, &num_shdrs);
431 struct ac_rtld_section *s = &part->sections[j];
482 struct ac_rtld_part *part = &binary->parts[i];
483 free(part->sections);
484 elf_end(part->elf);
493 static bool get_section_by_name(struct ac_rtld_part *part, const char *name, const char **data,
496 for (unsigned i = 0; i < part->num_sections; ++i) {
497 struct ac_rtld_section *s = &part->sections[i];
499 Elf_Scn *target_scn = elf_getscn(part->elf, i);
525 struct ac_rtld_part *part = &binary->parts[i];
529 if (!get_section_by_name(part, ".AMDGPU.config", &config_data, &config_nbytes))
547 * the main shader part is used. */
587 struct ac_rtld_part *part = &u->binary->parts[part_idx];
588 if (sym->st_shndx >= part->num_sections) {
593 struct ac_rtld_section *s = &part->sections[sym->st_shndx];
623 struct ac_rtld_part *part = &u->binary->parts[part_idx];
624 Elf_Scn *target_scn = elf_getscn(part->elf, reloc_shdr->sh_info);
630 Elf_Scn *symbols_scn = elf_getscn(part->elf, reloc_shdr->sh_link);
643 struct ac_rtld_section *s = &part->sections[reloc_shdr->sh_info];
669 const char *symbol_name = elf_strptr(part->elf, strtabidx, sym->st_name);
677 * addend is part of the relocation record? */
766 struct ac_rtld_part *part = &u->binary->parts[i];
769 while ((section = elf_nextscn(part->elf, section))) {
771 struct ac_rtld_section *s = &part->sections[elf_ndxscn(section)];
796 struct ac_rtld_part *part = &u->binary->parts[i];
798 while ((section = elf_nextscn(part->elf, section))) {