I have an ARM Tinkerboard running Debian 9.8 (Stretch). Systemd version is 232. I'm working on a program that can be run from userland or as a daemon. If it is run as a daemon, then
dlsym are used to locate Systemd
sd_notify(3) entry points.
According to the
sd_notify(3) man page:
These APIs are implemented as a shared library, which can be compiled and linked to with the libsystemd pkg-config(1) file.
Unfortunately, I cannot find
libsystemd.so. This is a userland test to simulate a service load:
$ LD_PRELOAD=/lib/libsystemd.so NOTIFY_SOCKET=-1 ./myprog.exe ERROR: ld.so: object '/lib/libsystemd.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
It does not seem to be located in the standard locations:
$ find /lib -name libsystemd.so $ find /usr -name libsystemd.so $
$ sudo find / -name libsystemd.so $
Where is the shared library located?