Add a CMocka suite around the production shared-object path helper and register it in the existing utility test hierarchy.
Cover directory extraction for a resolvable symbol, invalid symbol and buffer arguments, a zero-sized buffer, and an undersized buffer. These cases protect the path contract used by the library-adjacent mapping lookup.
PR #86 derives the mapping-file directory from dladdr's dli_fname. The initial implementation assumes that the resolved name contains a directory separator. If the loader returns a bare soname, the truncation loop reduces it to its first character and reports success, causing a bogus mapping-file lookup instead of using the executable-directory fallback.
Locate the final separator before copying, preserve the filesystem root, reject names that do not identify a directory, and validate the length of the returned directory rather than requiring room for the complete library filename.
Link the four PIUIO and PIUBTN keyboard and joystick targets directly with libdl so their dladdr dependency remains explicit on the supported older glibc environment.
This is mostly Din's work.
piuio and piubtn are both included in the piuio/lxio lib
To use in games which contain a button board specify the same
module for both piuio and piubtn configs.
This module takes care of emulating the ITG 2 piuio kernel driver
hack. As a separate module, this can be hooked into any chain of
existing hooks providing a greater level of flexibility and
transparency.