#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <link.h>
#include <dlfcn.h>
#include "dylib.h"
#include "fnbounds_interface.h"
#include <messages/messages.h>
Go to the source code of this file.
|
static int | dylib_map_open_dsos_callback (struct dl_phdr_info *info, size_t size, void *) |
|
static int | dylib_find_module_containing_addr_callback (struct dl_phdr_info *info, size_t size, void *fargs_v) |
|
void | dylib_map_open_dsos () |
|
void | dylib_map_executable () |
|
int | dylib_addr_is_mapped (void *addr) |
|
int | dylib_find_module_containing_addr (void *addr, char *module_name, void **start, void **end) |
|
int | dylib_find_proc (void *pc, void **proc_beg, void **mod_beg) |
|
bool | dylib_isin_start_func (void *pc) |
|
const char * | dylib_find_proc_name (const void *pc) |
|
void | dylib_get_segment_bounds (struct dl_phdr_info *info, struct dylib_seg_bounds_s *bounds) |
|
◆ SEG_IS_EXECUTABLE_CODE
#define SEG_IS_EXECUTABLE_CODE |
( |
|
info, |
|
|
|
seg |
|
) |
| |
Value: ((info)->dlpi_phdr !=
NULL) && \
((info)->dlpi_phdr[seg].p_type == PT_LOAD) && \
((info)->dlpi_phdr[seg].p_flags & PF_X))
Definition at line 96 of file dylib.c.
◆ SEG_SIZE
#define SEG_SIZE |
( |
|
info, |
|
|
|
seg |
|
) |
| ((info)->dlpi_phdr[seg].p_memsz) |
◆ SEG_START_ADDR
#define SEG_START_ADDR |
( |
|
info, |
|
|
|
seg |
|
) |
| ((char *) (info)->dlpi_addr + (info)->dlpi_phdr[seg].p_vaddr) |
◆ dylib_addr_is_mapped()
int dylib_addr_is_mapped |
( |
void * |
addr | ) |
|
◆ dylib_find_module_containing_addr()
int dylib_find_module_containing_addr |
( |
void * |
addr, |
|
|
char * |
module_name, |
|
|
void ** |
start, |
|
|
void ** |
end |
|
) |
| |
◆ dylib_find_module_containing_addr_callback()
static int dylib_find_module_containing_addr_callback |
( |
struct dl_phdr_info * |
info, |
|
|
size_t |
size, |
|
|
void * |
fargs_v |
|
) |
| |
|
static |
◆ dylib_find_proc()
int dylib_find_proc |
( |
void * |
pc, |
|
|
void ** |
proc_beg, |
|
|
void ** |
mod_beg |
|
) |
| |
◆ dylib_find_proc_name()
const char* dylib_find_proc_name |
( |
const void * |
pc | ) |
|
◆ dylib_get_segment_bounds()
void dylib_get_segment_bounds |
( |
struct dl_phdr_info * |
info, |
|
|
struct dylib_seg_bounds_s * |
bounds |
|
) |
| |
◆ dylib_isin_start_func()
bool dylib_isin_start_func |
( |
void * |
pc | ) |
|
◆ dylib_map_executable()
void dylib_map_executable |
( |
| ) |
|
◆ dylib_map_open_dsos()
void dylib_map_open_dsos |
( |
| ) |
|
◆ dylib_map_open_dsos_callback()
static int dylib_map_open_dsos_callback |
( |
struct dl_phdr_info * |
info, |
|
|
size_t |
size, |
|
|
void * |
unused |
|
) |
| |
|
static |