[master] 36fad6905 doc: Add recipe for how to read the vmod_vcs symbol on MacOS
Nils Goroll
nils.goroll at uplex.de
Sat May 31 18:14:05 UTC 2025
commit 36fad6905fd4cb6ca01aacbb7625a1966975d2f2
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sat May 31 20:12:37 2025 +0200
doc: Add recipe for how to read the vmod_vcs symbol on MacOS
Contributed by Rui Chen in #4339, thank you!
diff --git a/doc/sphinx/reference/vmod.rst b/doc/sphinx/reference/vmod.rst
index 0a87b9ee1..0afcae202 100644
--- a/doc/sphinx/reference/vmod.rst
+++ b/doc/sphinx/reference/vmod.rst
@@ -1053,11 +1053,17 @@ Reading the VCS version from the binary shared object
-----------------------------------------------------
As a useful by-product, the version information can also be extracted from the
-vmod ``.so`` file on many platforms. For example, on Linux using ``readelf
--p.vmod_vcs <file>``::
+vmod ``.so`` file on many platforms. On Linux using ``readelf -p.vmod_vcs
+<file>``::
$ readelf -p.vmod_vcs .../vmods/libvmod_dynamic.so
String dump of section '.vmod_vcs':
[ 0] 1e4179430404aaf170530af7514fbecb1f38f8af
+On MacOS::
+
+ $ otool -s __TEXT vmod_vcs .../vmods/libvmod_debug.so |
+ awk '/^[0-9a-f]/ {for(i=2;i<=NF;i++) printf "%s",$i}' |
+ xxd -r -p | strings
+ 18e27f081788b5e5d44c480f6d9749c07d53ddb9
More information about the varnish-commit
mailing list