I was trying to emulate a firmware and as a part of the process I was interested in knowing what device files are being registered using mknod. In order to intercept those calls I had created a shared object file and just for a dry run, I was trying to preload this shared library while making a call to mknod to register a character device while doing user space emulation with QEMU like so.

sudo strace chroot . ./qemu-mips-static -E LD_PRELOAD="/mknod.so" mknod chrdev4 100 0

The files are in the correct place and I was following a tutorial very closely so I know am not making a syntactical as such, but my strace log showed my preloaded library not being accessed at all. Please note that in this case, my mknod is a symbolic link to the busybox binary which in turn executes the mknod syscall. I was wondering if that level of indirection could be an issue and possibly a reason as to why my library isn't getting preloaded?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.