summaryrefslogtreecommitdiffstats
path: root/sys/kern/linker_if.m
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2001-10-30 15:21:45 +0000
committergreen <green@FreeBSD.org>2001-10-30 15:21:45 +0000
commite44401b785a1fffb6524e85f215bd99bfc778bf1 (patch)
tree04f5856e0de49a87ff73562b3145a85347ee7bcc /sys/kern/linker_if.m
parent8e31d7b2f43865c102269c5fe77a83fbc5fad376 (diff)
downloadFreeBSD-src-e44401b785a1fffb6524e85f215bd99bfc778bf1.zip
FreeBSD-src-e44401b785a1fffb6524e85f215bd99bfc778bf1.tar.gz
Add the sysctl "kern.function_list", which currently exports all
function symbols in the kernel in a list of C strings, with an extra nul-termination at the end. This sysctl requires addition of a new linker operation. Now, linker_file_t's need to respond to "each_function_name" to export their function symbols. Note that the sysctl doesn't currently allow distinguishing multiple symbols with the same name from different modules, but could quite easily without a change to the linker operation. This will be a nicety to have when it can be used. Obtained from: NAI Labs CBOSS project Funded by: DARPA
Diffstat (limited to 'sys/kern/linker_if.m')
-rw-r--r--sys/kern/linker_if.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/linker_if.m b/sys/kern/linker_if.m
index be84b9e..9dafb57 100644
--- a/sys/kern/linker_if.m
+++ b/sys/kern/linker_if.m
@@ -54,6 +54,16 @@ METHOD int search_symbol {
};
#
+# Call the callback with each specified function defined in the file.
+# Stop and return the error if the callback returns an error.
+#
+METHOD int each_function_name {
+ linker_file_t file;
+ linker_function_name_callback_t callback;
+ void* opaque;
+};
+
+#
# Search for a linker set in a file. Return a pointer to the first
# entry (which is itself a pointer), and the number of entries.
# "stop" points to the entry beyond the last valid entry.
OpenPOWER on IntegriCloud