Lines Matching refs:part
175 * Read LDS symbols from the given \p section of the ELF of \p part and append
198 struct ac_rtld_part *part = &binary->parts[part_idx];
221 s.name = elf_strptr(part->elf, strtabidx, symbol->st_name);
326 struct ac_rtld_part *part = &binary->parts[part_idx];
330 part->elf = elf_memory((char *)i.elf_ptrs[part_idx], i.elf_sizes[part_idx]);
331 report_elf_if(!part->elf);
333 const Elf64_Ehdr *ehdr = elf64_getehdr(part->elf);
339 report_elf_if(elf_getshdrstrndx(part->elf, §ion_str_index) < 0);
340 report_elf_if(elf_getshdrnum(part->elf, &num_shdrs) < 0);
342 part->num_sections = num_shdrs;
343 part->sections = calloc(sizeof(*part->sections), num_shdrs);
344 report_if(!part->sections);
347 while ((section = elf_nextscn(part->elf, section))) {
349 struct ac_rtld_section *s = &part->sections[elf_ndxscn(section)];
350 s->name = elf_strptr(part->elf, section_str_index, shdr->sh_name);
429 struct ac_rtld_part *part = &binary->parts[part_idx];
431 elf_getshdrnum(part->elf, &num_shdrs);
434 struct ac_rtld_section *s = &part->sections[j];
481 struct ac_rtld_part *part = &binary->parts[i];
482 free(part->sections);
483 elf_end(part->elf);
492 static bool get_section_by_name(struct ac_rtld_part *part, const char *name, const char **data,
495 for (unsigned i = 0; i < part->num_sections; ++i) {
496 struct ac_rtld_section *s = &part->sections[i];
498 Elf_Scn *target_scn = elf_getscn(part->elf, i);
524 struct ac_rtld_part *part = &binary->parts[i];
528 if (!get_section_by_name(part, ".AMDGPU.config", &config_data, &config_nbytes))
546 * the main shader part is used. */
586 struct ac_rtld_part *part = &u->binary->parts[part_idx];
587 if (sym->st_shndx >= part->num_sections) {
592 struct ac_rtld_section *s = &part->sections[sym->st_shndx];
622 struct ac_rtld_part *part = &u->binary->parts[part_idx];
623 Elf_Scn *target_scn = elf_getscn(part->elf, reloc_shdr->sh_info);
629 Elf_Scn *symbols_scn = elf_getscn(part->elf, reloc_shdr->sh_link);
642 struct ac_rtld_section *s = &part->sections[reloc_shdr->sh_info];
668 const char *symbol_name = elf_strptr(part->elf, strtabidx, sym->st_name);
676 * addend is part of the relocation record? */
765 struct ac_rtld_part *part = &u->binary->parts[i];
768 while ((section = elf_nextscn(part->elf, section))) {
770 struct ac_rtld_section *s = &part->sections[elf_ndxscn(section)];
795 struct ac_rtld_part *part = &u->binary->parts[i];
797 while ((section = elf_nextscn(part->elf, section))) {