Files | |
| file | elf_core.h |
| file | istate.h |
| file | istate.h |
| file | symtab.h |
Data Structures | |
| struct | symtab_t |
Functions | |
| static int | chunk_load (int fd, off64_t start, size_t size, void **ptr) |
| Load a segment of bytes from a file and return it as a new memory block. | |
| int | elf_core_save (const char *file_name, as_area_info_t *ainfo, unsigned int n, int phoneid) |
| Save ELF core file. | |
| static int | elf_hdr_check (elf_header_t *ehdr) |
| Check if ELF header is valid. | |
| static int | read_all (int fd, void *buf, size_t len) |
| Read until the buffer is read in its entirety. | |
| static int | section_hdr_load (int fd, const elf_header_t *elf_hdr, int idx, elf_section_header_t *sec_hdr) |
| Load ELF section header. | |
| int | symtab_addr_to_name (symtab_t *st, uintptr_t addr, char **name, size_t *offs) |
| Convert symbol address to name. | |
| void | symtab_delete (symtab_t *st) |
| Delete a symtab structure. | |
| int | symtab_load (const char *file_name, symtab_t **symtab) |
| Load symbol table from an ELF file. | |
| int | symtab_name_to_addr (symtab_t *st, char *name, uintptr_t *addr) |
| Convert symbol name to address. | |
Load a segment of bytes from a file and return it as a new memory block.
This function fails if it cannot read exactly size bytes from the file.
| fd | File to read from. | |
| start | Position in file where to start reading. | |
| size | Number of bytes to read. | |
| ptr | Place to store pointer to newly allocated block. |
| int elf_core_save | ( | const char * | file_name, | |
| as_area_info_t * | ainfo, | |||
| unsigned int | n, | |||
| int | phoneid | |||
| ) |
Save ELF core file.
| file_name | Name of file to save to. | |
| ainfo | Array of n memory area info structures. | |
| n | Number of memory areas. | |
| phoneid | Debugging phone. |
Definition at line 81 of file elf_core.c.
| static int elf_hdr_check | ( | elf_header_t * | ehdr | ) | [static] |
| static int read_all | ( | int | fd, | |
| void * | buf, | |||
| size_t | len | |||
| ) | [static] |
Read until the buffer is read in its entirety.
This function fails if it cannot read exactly len bytes from the file.
| fd | The file to read from. | |
| buf | Buffer for storing data, len bytes long. | |
| len | Number of bytes to read. |
| static int section_hdr_load | ( | int | fd, | |
| const elf_header_t * | elf_hdr, | |||
| int | idx, | |||
| elf_section_header_t * | sec_hdr | |||
| ) | [static] |
Convert symbol address to name.
This function finds the symbol which starts at the highest address less than or equal to addr.
| st | Symbol table. | |
| addr | Address for lookup. | |
| name | Place to store pointer name of symbol, if found. This is valid while st exists. |
| void symtab_delete | ( | symtab_t * | st | ) |
| int symtab_load | ( | const char * | file_name, | |
| symtab_t ** | symtab | |||
| ) |
1.4.7