summaryrefslogtreecommitdiff
path: root/cmd/srv9p/static.h.gen
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/srv9p/static.h.gen')
-rwxr-xr-xcmd/srv9p/static.h.gen6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/srv9p/static.h.gen b/cmd/srv9p/static.h.gen
new file mode 100755
index 0000000..1c4d7b1
--- /dev/null
+++ b/cmd/srv9p/static.h.gen
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+nm --format=posix "$@" |
+ sed -n -E \
+ -e 's/(.*_(end|start)) D .*/extern char \1[];/p' \
+ -e 's/(.*_size) A .*/extern size_t \1;/p'