/tools/perf/util/ |
D | genelf.c | 165 Elf_Shdr *shdr; in jit_add_eh_frame_info() local 190 shdr = elf_getshdr(scn); in jit_add_eh_frame_info() 191 if (!shdr) { in jit_add_eh_frame_info() 196 shdr->sh_name = 104; in jit_add_eh_frame_info() 197 shdr->sh_type = SHT_PROGBITS; in jit_add_eh_frame_info() 198 shdr->sh_addr = base_offset; in jit_add_eh_frame_info() 199 shdr->sh_flags = SHF_ALLOC; in jit_add_eh_frame_info() 200 shdr->sh_entsize = 0; in jit_add_eh_frame_info() 224 shdr = elf_getshdr(scn); in jit_add_eh_frame_info() 225 if (!shdr) { in jit_add_eh_frame_info() [all …]
|
D | genelf_debug.c | 499 Elf_Shdr *shdr; in jit_add_debug_info() local 532 shdr = elf_getshdr(scn); in jit_add_debug_info() 533 if (!shdr) { in jit_add_debug_info() 538 shdr->sh_name = 52; /* .debug_line */ in jit_add_debug_info() 539 shdr->sh_type = SHT_PROGBITS; in jit_add_debug_info() 540 shdr->sh_addr = 0; /* must be zero or == sh_offset -> dynamic object */ in jit_add_debug_info() 541 shdr->sh_flags = 0; in jit_add_debug_info() 542 shdr->sh_entsize = 0; in jit_add_debug_info() 566 shdr = elf_getshdr(scn); in jit_add_debug_info() 567 if (!shdr) { in jit_add_debug_info() [all …]
|
D | symbol-elf.c | 156 static inline const char *elf_sec__name(const GElf_Shdr *shdr, in elf_sec__name() argument 159 return secstrs->d_buf + shdr->sh_name; in elf_sec__name() 162 static inline int elf_sec__is_text(const GElf_Shdr *shdr, in elf_sec__is_text() argument 165 return strstr(elf_sec__name(shdr, secstrs), "text") != NULL; in elf_sec__is_text() 168 static inline bool elf_sec__is_data(const GElf_Shdr *shdr, in elf_sec__is_data() argument 171 return strstr(elf_sec__name(shdr, secstrs), "data") != NULL; in elf_sec__is_data() 174 static bool elf_sec__filter(GElf_Shdr *shdr, Elf_Data *secstrs) in elf_sec__filter() argument 176 return elf_sec__is_text(shdr, secstrs) || in elf_sec__filter() 177 elf_sec__is_data(shdr, secstrs); in elf_sec__filter() 183 GElf_Shdr shdr; in elf_addr_to_index() local [all …]
|
D | unwind-libunwind-local.c | 176 GElf_Shdr shdr; in elf_section_address_and_offset() local 186 if (!elf_section_by_name(elf, &ehdr, &shdr, name, NULL)) in elf_section_address_and_offset() 189 *address = shdr.sh_addr; in elf_section_address_and_offset() 190 *offset = shdr.sh_offset; in elf_section_address_and_offset()
|
D | probe-finder.c | 1263 GElf_Shdr shdr; in debuginfo__find_probes() local 1265 if (elf_section_by_name(elf, &ehdr, &shdr, ".eh_frame", NULL) && in debuginfo__find_probes() 1266 shdr.sh_type == SHT_PROGBITS) in debuginfo__find_probes() 1688 GElf_Shdr mem, *shdr; in debuginfo__get_text_offset() local 1707 shdr = gelf_getshdr(scn, &mem); in debuginfo__get_text_offset() 1708 if (!shdr) in debuginfo__get_text_offset() 1710 *offs = shdr->sh_addr; in debuginfo__get_text_offset() 1712 *offs -= shdr->sh_offset; in debuginfo__get_text_offset()
|
D | probe-event.c | 285 GElf_Shdr shdr; in find_module_name() local 302 sec = elf_section_by_name(elf, &ehdr, &shdr, in find_module_name() 609 GElf_Shdr shdr; in get_text_start_address() local 628 if (!elf_section_by_name(elf, &ehdr, &shdr, ".text", NULL)) in get_text_start_address() 631 *address = shdr.sh_addr - shdr.sh_offset; in get_text_start_address()
|
/tools/lib/bpf/ |
D | linker.c | 42 Elf64_Shdr *shdr; member 111 Elf64_Shdr *shdr; member 286 symtab->shdr->sh_size += sizeof(*sym); in add_new_sym() 351 sec->shdr = elf64_getshdr(sec->scn); in init_output_elf() 352 if (!sec->shdr) in init_output_elf() 369 sec->shdr->sh_name = str_off; in init_output_elf() 370 sec->shdr->sh_type = SHT_STRTAB; in init_output_elf() 371 sec->shdr->sh_flags = SHF_STRINGS; in init_output_elf() 372 sec->shdr->sh_offset = 0; in init_output_elf() 373 sec->shdr->sh_link = 0; in init_output_elf() [all …]
|
D | libbpf.c | 605 Elf64_Shdr *shdr; member 3263 Elf64_Shdr *shdr; in elf_sec_hdr() local 3268 shdr = elf64_getshdr(scn); in elf_sec_hdr() 3269 if (!shdr) { in elf_sec_hdr() 3275 return shdr; in elf_sec_hdr() 3503 sec_desc->shdr = sh; in bpf_object__elf_collect() 3508 sec_desc->shdr = sh; in bpf_object__elf_collect() 3539 sec_desc->shdr = sh; in bpf_object__elf_collect() 3544 sec_desc->shdr = sh; in bpf_object__elf_collect() 4236 bpf_object__collect_prog_relos(struct bpf_object *obj, Elf64_Shdr *shdr, Elf_Data *data) in bpf_object__collect_prog_relos() argument [all …]
|
D | usdt.c | 357 static int find_elf_sec_by_name(Elf *elf, const char *sec_name, GElf_Shdr *shdr, Elf_Scn **scn) in find_elf_sec_by_name() argument 372 if (!gelf_getshdr(sec, shdr)) in find_elf_sec_by_name() 375 name = elf_strptr(elf, shstrndx, shdr->sh_name); in find_elf_sec_by_name()
|
/tools/testing/selftests/filesystems/fuse/ |
D | bpf_loader.c | 740 GElf_Shdr shdr; in install_elf_bpf() local 744 TESTEQUAL((void *)gelf_getshdr(scn, &shdr), &shdr); in install_elf_bpf() 745 TEST(shname = elf_strptr(elf, ehdr.e_shstrndx, shdr.sh_name), in install_elf_bpf() 751 } else if (shdr.sh_type == SHT_SYMTAB) { in install_elf_bpf() 753 symbol_index = shdr.sh_link; in install_elf_bpf()
|