filemon(4) only wraps the native and freebsd32 syscall tables, so a
Linux binary run by a traced process produces only E, F and X records.
A Linux cross toolchain (such as the Yocto/Poky SDK) run by make in
meta mode left no R/W/M/D/L records in the .meta files, breaking both
gendirdeps and meta mode's out-of-date checks on headers and libraries
read by the compiler and linker.
- The record-writing code in filemon_wrapper.c is now the exported filemon_log_{chdir,link,open,rename,unlink}() functions, which take user-space paths. The native wrappers use them, with no change in the records produced. filemon.ko exports only these symbols.
- The new filemon_linux module wraps the file related entries in linux_sysent: open, openat, creat, rename, renameat, renameat2, unlink, unlinkat (not AT_REMOVEDIR), link, linkat, symlink, symlinkat and chdir. It calls the saved original handler and, on success, converts Linux open flags and AT_FDCWD and calls filemon_log_*(). filemon_linux32 does the same for 32-bit Linux binaries on amd64. Like filemon, unloading requires -f.
- Paths are recorded as passed by the Linux binary, without the linux(4) emulation directory prefix. This is documented in filemon(4).