Skip to content
Snippets Groups Projects
Commit 622359fc authored by Simon McVittie's avatar Simon McVittie
Browse files

Add more doc-comments

parent 6795a409
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -53,6 +53,15 @@ dump_ld_cache (ld_libs_t *ldlibs)
ld_cache_foreach( &ldlibs->ldcache, ld_entry_dump, stderr );
}
/*
* wrap:
* @name:
* @base: Starting address of the program header in memory.
* Addresses are normally relative to this, except for when they are
* absolute (see fix_addr()).
* @dyn: An array of ElfW(Dyn) structures, somewhere after @base
* @wrappers: Relocations to apply
*/
static void
wrap (const char *name,
ElfW(Addr) base,
......
......@@ -43,6 +43,15 @@
// =========================================================================
/*
* process_phdr:
* @info: struct dl_phdr_info describing the shared object
* @size: sizeof(info)
* @rdata: the closure that we passed to dl_iterate_phdr()
*
* Callback called for each shared object loaded into the program.
*/
static int
process_phdr (struct dl_phdr_info *info,
size_t size,
......
......@@ -573,6 +573,23 @@ process_dt_rel (const void *start,
return 0;
}
/*
* process_pt_dynamic:
* @start: offset of dynamic section (an array of ElfW(Dyn) structures)
* relative to @base
* @size: size of dynamic section in bytes (not structs!), or 0
* if the dynamic section is terminated by an entry with d_tag == DT_NULL
* @base: Starting address of the program header (the shared object)
* in memory. @start is relative to this. Addresses are normally
* relative to this, except for when they are absolute (see fix_addr()).
* @process_rela: called when we find the DT_RELA section
* @process_rel: called when we find the DT_REL section
* @data: arbitrary user data to be passed to both @process_rela
* and @process_rel
*
* Iterate over the PT_DYNAMIC entry in a shared library and perform
* relocations using the given callbacks.
*/
int
process_pt_dynamic (void *start,
size_t size,
......
......@@ -40,6 +40,17 @@ typedef struct
ptr_list *seen;
} relocation_data_t;
/*
* relocate_cb_t:
* @start: beginning of an array of relocation entries
* @relasz: number of bytes (not number of structs!) following @start
* @strtab: string table, a series of 0-terminated strings concatenated
* @symtab: symbol table, an array of ElfW(Sym) structs
* @base: base address ???
* @data: the same data that was passed to process_pt_dynamic()
*
* Callback used to iterate over relocations.
*/
typedef int (*relocate_cb_t)(const void *start,
const int relasz,
const char *strtab,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment