summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_linker.c
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2007-11-18 00:23:31 +0000
committerjb <jb@FreeBSD.org>2007-11-18 00:23:31 +0000
commit9bd9c03e9216324dd9dfcda9145702c561b4abb8 (patch)
tree55bd23df13e645c28c563525f2433dd5ff2447ea /sys/kern/kern_linker.c
parent804a2cd23889a22a7ab5641fcfe31330a66f154e (diff)
downloadFreeBSD-src-9bd9c03e9216324dd9dfcda9145702c561b4abb8.zip
FreeBSD-src-9bd9c03e9216324dd9dfcda9145702c561b4abb8.tar.gz
Add a function to list symbols in a file and their values at the
same time rather than having to list the symbols and then go back and look each one up by name.
Diffstat (limited to 'sys/kern/kern_linker.c')
-rw-r--r--sys/kern/kern_linker.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index e6080aa..321436d 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -690,6 +690,16 @@ linker_file_lookup_set(linker_file_t file, const char *name,
return (error);
}
+/*
+ * List all functions in a file.
+ */
+int
+linker_file_function_listall(linker_file_t lf,
+ int (*callback_func)(linker_file_t, linker_symval_t *, void *), void *arg)
+{
+ return (LINKER_EACH_FUNCTION_NAMEVAL(lf, callback_func, arg));
+}
+
caddr_t
linker_file_lookup_symbol(linker_file_t file, const char *name, int deps)
{
OpenPOWER on IntegriCloud