summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2007-04-03 18:33:41 +0000
committerkan <kan@FreeBSD.org>2007-04-03 18:33:41 +0000
commit67fa2d73af03de731ecca39012417ed70829f489 (patch)
treef612e767849f79c5e3105da84734d87bf8b9adcb
parent0dd97e2c183c4064e9883accc0097616edb73c80 (diff)
downloadFreeBSD-src-67fa2d73af03de731ecca39012417ed70829f489.zip
FreeBSD-src-67fa2d73af03de731ecca39012417ed70829f489.tar.gz
Add dl_iterate_phdr function prototype and corresponding dl_phdr_info
structure definition.
-rw-r--r--sys/sys/link_elf.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/sys/sys/link_elf.h b/sys/sys/link_elf.h
index d1c2900..6e6660f 100644
--- a/sys/sys/link_elf.h
+++ b/sys/sys/link_elf.h
@@ -41,7 +41,7 @@
#ifndef _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.
@@ -76,4 +76,24 @@ struct r_debug {
} 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_ */
OpenPOWER on IntegriCloud