Lines Matching refs:shdr

88 static inline const char *elf_sec__name(const GElf_Shdr *shdr,  in elf_sec__name()  argument
91 return secstrs->d_buf + shdr->sh_name; in elf_sec__name()
94 static inline int elf_sec__is_text(const GElf_Shdr *shdr, in elf_sec__is_text() argument
97 return strstr(elf_sec__name(shdr, secstrs), "text") != NULL; in elf_sec__is_text()
100 static inline bool elf_sec__is_data(const GElf_Shdr *shdr, in elf_sec__is_data() argument
103 return strstr(elf_sec__name(shdr, secstrs), "data") != NULL; in elf_sec__is_data()
106 static bool elf_sec__is_a(GElf_Shdr *shdr, Elf_Data *secstrs, in elf_sec__is_a() argument
111 return elf_sec__is_text(shdr, secstrs); in elf_sec__is_a()
113 return elf_sec__is_data(shdr, secstrs); in elf_sec__is_a()
122 GElf_Shdr shdr; in elf_addr_to_index() local
126 gelf_getshdr(sec, &shdr); in elf_addr_to_index()
128 if ((addr >= shdr.sh_addr) && in elf_addr_to_index()
129 (addr < (shdr.sh_addr + shdr.sh_size))) in elf_addr_to_index()
320 GElf_Shdr shdr; in elf_read_build_id() local
345 sec = elf_section_by_name(elf, &ehdr, &shdr, in elf_read_build_id()
350 sec = elf_section_by_name(elf, &ehdr, &shdr, in elf_read_build_id()
355 sec = elf_section_by_name(elf, &ehdr, &shdr, in elf_read_build_id()
473 GElf_Shdr shdr; in filename__read_debuglink() local
497 sec = elf_section_by_name(elf, &ehdr, &shdr, in filename__read_debuglink()
616 GElf_Shdr shdr; in symsrc__init() local
619 elf_section_by_name(elf, &ehdr, &shdr, in symsrc__init()
688 GElf_Shdr shdr; in dso__load_sym() local
714 shdr = syms_ss->symshdr; in dso__load_sym()
723 sec = elf_getscn(elf, shdr.sh_link); in dso__load_sym()
739 nr_syms = shdr.sh_size / shdr.sh_entsize; in dso__load_sym()
812 gelf_getshdr(sec, &shdr); in dso__load_sym()
814 if (is_label && !elf_sec__is_a(&shdr, secstrs, map->type)) in dso__load_sym()
817 section_name = elf_sec__name(&shdr, secstrs); in dso__load_sym()
831 sym.st_value -= shdr.sh_addr - shdr.sh_offset; in dso__load_sym()
846 map->start = shdr.sh_addr + in dso__load_sym()
848 map->end = map->start + shdr.sh_size; in dso__load_sym()
849 map->pgoff = shdr.sh_offset; in dso__load_sym()
864 map->pgoff = shdr.sh_offset; in dso__load_sym()
883 start += map->start + shdr.sh_offset; in dso__load_sym()
898 curr_map->start = shdr.sh_addr + in dso__load_sym()
901 shdr.sh_size; in dso__load_sym()
902 curr_map->pgoff = shdr.sh_offset; in dso__load_sym()
921 (u64)sym.st_value, (u64)shdr.sh_addr, in dso__load_sym()
922 (u64)shdr.sh_offset); in dso__load_sym()
923 sym.st_value -= shdr.sh_addr - shdr.sh_offset; in dso__load_sym()