Home | History | Annotate | Download | only in libdw

Lines Matching refs:elf

1 /* Get CFI from ELF file's exception-handling info.
44 allocate_cfi (Elf *elf, GElf_Addr vaddr)
53 cfi->e_ident = (unsigned char *) elf_getident (elf, NULL);
126 getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr)
128 Elf_Data *data = elf_getdata_rawchunk (elf, phdr->p_offset, phdr->p_filesz,
166 if (elf_rawfile (elf, &filesize) != NULL)
169 data = elf_getdata_rawchunk (elf, eh_frame_offset, eh_frame_size, ELF_T_BYTE);
175 Dwarf_CFI *cfi = allocate_cfi (elf, eh_frame_ptr);
194 getcfi_phdr (Elf *elf, const GElf_Ehdr *ehdr)
197 if (unlikely (elf_getphdrnum (elf, &phnum) != 0))
203 GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem);
207 return getcfi_gnu_eh_frame (elf, ehdr, phdr);
215 getcfi_scn_eh_frame (Elf *elf, const GElf_Ehdr *ehdr,
225 Dwarf_CFI *cfi = allocate_cfi (elf, shdr->sh_addr);
271 getcfi_shdr (Elf *elf, const GElf_Ehdr *ehdr)
274 if (elf_getshdrstrndx (elf, &shstrndx) != 0)
285 while ((scn = elf_nextscn (elf, scn)) != NULL)
291 const char *name = elf_strptr (elf, shstrndx, shdr->sh_name);
302 return getcfi_scn_eh_frame (elf, ehdr, scn, shdr,
314 dwarf_getcfi_elf (Elf *elf)
316 if (elf_kind (elf) != ELF_K_ELF)
323 GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
330 Dwarf_CFI *result = getcfi_shdr (elf, ehdr);
332 result = getcfi_phdr (elf, ehdr);