mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-23 10:14:55 +00:00
Add dl_iterate_phdr function prototype and corresponding dl_phdr_info
structure definition.
This commit is contained in:
parent
49f90ad282
commit
585b090609
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168313
|
@ -41,7 +41,7 @@
|
||||||
#ifndef _SYS_LINK_ELF_H_
|
#ifndef _SYS_LINK_ELF_H_
|
||||||
#define _SYS_LINK_ELF_H_
|
#define _SYS_LINK_ELF_H_
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/elf.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flags that describe the origin of the entries in Dl_serinfo.
|
* Flags that describe the origin of the entries in Dl_serinfo.
|
||||||
|
@ -76,4 +76,24 @@ struct r_debug {
|
||||||
} r_state;
|
} r_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct dl_phdr_info
|
||||||
|
{
|
||||||
|
Elf_Addr dlpi_addr; /* module relocation base */
|
||||||
|
const char *dlpi_name; /* module name */
|
||||||
|
const Elf_Phdr *dlpi_phdr; /* pointer to module's phdr */
|
||||||
|
Elf_Half dlpi_phnum; /* number of entries in phdr */
|
||||||
|
unsigned long long int dlpi_adds; /* total # of loads */
|
||||||
|
unsigned long long int dlpi_subs; /* total # of unloads */
|
||||||
|
size_t dlpi_tls_modid;
|
||||||
|
void *dlpi_tls_data;
|
||||||
|
};
|
||||||
|
|
||||||
|
__BEGIN_DECLS
|
||||||
|
|
||||||
|
typedef int (*__dl_iterate_hdr_callback)(struct dl_phdr_info *, size_t,
|
||||||
|
void *);
|
||||||
|
extern int dl_iterate_phdr(__dl_iterate_hdr_callback, void *);
|
||||||
|
|
||||||
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* _SYS_LINK_ELF_H_ */
|
#endif /* _SYS_LINK_ELF_H_ */
|
||||||
|
|
Loading…
Reference in a new issue