dl_iterate_phdr (3) - Linux Manuals
dl_iterate_phdr: walk through list of shared objects
NAME
dl_iterate_phdr - walk through list of shared objects
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */ #include <link.h> int dl_iterate_phdr( int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data);
DESCRIPTION
The dl_iterate_phdr() function allows an application to inquire at run time to find out which shared objects it has loaded, and the order in which they were loaded.The dl_iterate_phdr() function walks through the list of an application's shared objects and calls the function callback once for each object, until either all shared objects have been processed or callback returns a nonzero value.
Each call to callback receives three arguments: info, which is a pointer to a structure containing information about the shared object; size, which is the size of the structure pointed to by info; and data, which is a copy of whatever value was passed by the calling program as the second argument (also named data) in the call to dl_iterate_phdr().
The info argument is a structure of the following type:
struct dl_phdr_info {