XS-libdwarf
view release on metacpan or search on metacpan
libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_elfread.h view on Meta::CPAN
of integers. [0] is the version, which
can only be one(1) . */
Dwarf_Unsigned * gh_sht_group_array;
/* Number of elements in the gh_sht_group_array. */
Dwarf_Unsigned gh_sht_group_array_count;
/* TRUE if .debug_info .eh_frame etc. */
char gh_is_dwarf;
};
struct generic_dynentry {
Dwarf_Unsigned gd_tag;
/* gd_val stands in for d_ptr and d_val union,
the union adds nothing in practice since
we expect ptrsize <= ulongest. */
Dwarf_Unsigned gd_val;
Dwarf_Unsigned gd_dyn_file_offset;
};
struct generic_symentry {
Dwarf_Unsigned gs_name;
Dwarf_Unsigned gs_value;
Dwarf_Unsigned gs_size;
Dwarf_Unsigned gs_info;
Dwarf_Unsigned gs_other;
Dwarf_Unsigned gs_shndx;
/* derived */
Dwarf_Unsigned gs_bind;
Dwarf_Unsigned gs_type;
};
struct location {
const char *g_name;
Dwarf_Unsigned g_offset;
Dwarf_Unsigned g_count;
Dwarf_Unsigned g_entrysize;
Dwarf_Unsigned g_totalsize;
};
typedef struct elf_filedata_s {
/* f_ident[0] == 'E' means it is elf and
elf_filedata_s is the struct involved.
Other means error/corruption of some kind.
f_ident[1] is a version number.
Only version 1 is defined. */
char f_ident[8];
char * f_path; /* non-null if known. Must be freed */
int f_fd;
unsigned f_machine; /* EM_* */
int f_destruct_close_fd;
int f_is_64bit;
unsigned f_endian;
Dwarf_Unsigned f_filesize;
Dwarf_Unsigned f_flags;
/* Elf size, not DWARF. 32 or 64 */
Dwarf_Small f_offsetsize;
Dwarf_Small f_pointersize;
int f_ftype;
int f_path_source;
Dwarf_Unsigned f_max_secdata_offset;
Dwarf_Unsigned f_max_progdata_offset;
void (*f_copy_word) (void *, const void *, unsigned long);
struct location f_loc_ehdr;
struct generic_ehdr* f_ehdr;
struct location f_loc_shdr;
struct generic_shdr* f_shdr;
struct location f_loc_phdr;
struct generic_phdr* f_phdr;
char *f_elf_shstrings_data; /* section name strings */
/* length of currentsection. Might be zero..*/
Dwarf_Unsigned f_elf_shstrings_length;
/* size of malloc-d space */
Dwarf_Unsigned f_elf_shstrings_max;
/* This is the .dynamic section */
struct location f_loc_dynamic;
struct generic_dynentry * f_dynamic;
Dwarf_Unsigned f_dynamic_sect_index;
/* .dynsym, .dynstr */
struct location f_loc_dynsym;
struct generic_symentry* f_dynsym;
char *f_dynsym_sect_strings;
Dwarf_Unsigned f_dynsym_sect_strings_max;
Dwarf_Unsigned f_dynsym_sect_strings_sect_index;
Dwarf_Unsigned f_dynsym_sect_index;
/* .symtab .strtab */
struct location f_loc_symtab;
struct generic_symentry* f_symtab;
char * f_symtab_sect_strings;
Dwarf_Unsigned f_symtab_sect_strings_max;
Dwarf_Unsigned f_symtab_sect_strings_sect_index;
Dwarf_Unsigned f_symtab_sect_index;
/* Starts at 3. 0,1,2 used specially. */
Dwarf_Unsigned f_sg_next_group_number;
/* Both the following will be zero unless there
are explicit Elf groups. */
Dwarf_Unsigned f_sht_group_type_section_count;
Dwarf_Unsigned f_shf_group_flag_section_count;
Dwarf_Unsigned f_dwo_group_section_count;
} dwarf_elf_object_access_internals_t;
int dwarf_construct_elf_access(int fd,
const char *path,
dwarf_elf_object_access_internals_t **ep,int *errcode);
int dwarf_destruct_elf_access(
dwarf_elf_object_access_internals_t *ep,int *errcode);
int _dwarf_load_elf_header(
dwarf_elf_object_access_internals_t *ep,int *errcode);
int _dwarf_load_elf_sectheaders(
dwarf_elf_object_access_internals_t* ep,int *errcode);
int _dwarf_load_elf_symtab_symbols(
dwarf_elf_object_access_internals_t *ep,int *errcode);
( run in 1.083 second using v1.01-cache-2.11-cpan-39bf76dae61 )