Searched refs:phdr (Results 1 – 5 of 5) sorted by relevance
/tools/testing/selftests/kvm/lib/ |
D | elf.c | 149 Elf64_Phdr phdr; in kvm_vm_elf_load() local 150 test_read(fd, &phdr, sizeof(phdr)); in kvm_vm_elf_load() 153 if (phdr.p_type != PT_LOAD) in kvm_vm_elf_load() 157 TEST_ASSERT(phdr.p_memsz > 0, "Unexpected loadable segment " in kvm_vm_elf_load() 160 n1, (uint64_t) phdr.p_memsz); in kvm_vm_elf_load() 161 vm_vaddr_t seg_vstart = phdr.p_vaddr; in kvm_vm_elf_load() 163 vm_vaddr_t seg_vend = phdr.p_vaddr + phdr.p_memsz - 1; in kvm_vm_elf_load() 183 if (phdr.p_filesz) { in kvm_vm_elf_load() 184 offset_rv = lseek(fd, phdr.p_offset, SEEK_SET); in kvm_vm_elf_load() 185 TEST_ASSERT(offset_rv == phdr.p_offset, in kvm_vm_elf_load() [all …]
|
/tools/perf/util/ |
D | symbol-minimal.c | 117 Elf32_Phdr *phdr; in filename__read_build_id() local 137 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id() 142 phdr->p_type = bswap_32(phdr->p_type); in filename__read_build_id() 143 phdr->p_offset = bswap_32(phdr->p_offset); in filename__read_build_id() 144 phdr->p_filesz = bswap_32(phdr->p_filesz); in filename__read_build_id() 147 if (phdr->p_type != PT_NOTE) in filename__read_build_id() 150 buf_size = phdr->p_filesz; in filename__read_build_id() 151 offset = phdr->p_offset; in filename__read_build_id() 168 Elf64_Phdr *phdr; in filename__read_build_id() local 188 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id() [all …]
|
D | genelf.c | 254 Elf_Phdr *phdr; in jit_write_elf() local 292 phdr = elf_newphdr(e, 1); in jit_write_elf() 293 phdr[0].p_type = PT_LOAD; in jit_write_elf() 294 phdr[0].p_offset = GEN_ELF_TEXT_OFFSET; in jit_write_elf() 295 phdr[0].p_vaddr = GEN_ELF_TEXT_OFFSET; in jit_write_elf() 296 phdr[0].p_paddr = GEN_ELF_TEXT_OFFSET; in jit_write_elf() 297 phdr[0].p_filesz = csize; in jit_write_elf() 298 phdr[0].p_memsz = csize; in jit_write_elf() 299 phdr[0].p_flags = PF_X | PF_R; in jit_write_elf() 300 phdr[0].p_align = 8; in jit_write_elf()
|
D | symbol-elf.c | 235 static int elf_read_program_header(Elf *elf, u64 vaddr, GElf_Phdr *phdr) in elf_read_program_header() argument 244 if (gelf_getphdr(elf, i, phdr) == NULL) in elf_read_program_header() 247 if (phdr->p_type != PT_LOAD) in elf_read_program_header() 250 sz = max(phdr->p_memsz, phdr->p_filesz); in elf_read_program_header() 254 if (vaddr >= phdr->p_vaddr && (vaddr < phdr->p_vaddr + sz)) in elf_read_program_header() 1248 GElf_Phdr phdr; in dso__load_sym() local 1251 (u64)sym.st_value, &phdr)) { in dso__load_sym() 1271 __func__, (u64)sym.st_value, (u64)phdr.p_vaddr, in dso__load_sym() 1272 (u64)phdr.p_offset); in dso__load_sym() 1273 sym.st_value -= phdr.p_vaddr - phdr.p_offset; in dso__load_sym() [all …]
|
/tools/testing/selftests/powerpc/ptrace/ |
D | core-pkey.c | 199 Elf64_Phdr *phdr; in check_core_file() local 216 phdr_size = sizeof(*phdr) * ehdr->e_phnum; in check_core_file() 223 for (phdr = p + ehdr->e_phoff; in check_core_file() 224 (void *) phdr < p + ehdr->e_phoff + phdr_size; in check_core_file() 225 phdr += ehdr->e_phentsize) in check_core_file() 226 if (phdr->p_type == PT_NOTE) in check_core_file() 229 FAIL_IF((void *) phdr >= p + ehdr->e_phoff + phdr_size); in check_core_file() 232 for (nhdr = p + phdr->p_offset; in check_core_file() 233 (void *) nhdr < p + phdr->p_offset + phdr->p_filesz; in check_core_file() 238 FAIL_IF((void *) nhdr >= p + phdr->p_offset + phdr->p_filesz); in check_core_file()
|