c++ - linux dynamic link library injection -
currently i'm working on application plugin written in c++ - on windows i'm injecting dll process, capturing interfaces , doing work - question - how can similar on linux? prefer doing without editing executable - code injection running process.
if can control startup of process, use ld_preload force-load library alongside executable, possibly shadowing symbols other libraries (that linked binary):
ld_preload=/path/to/libfoo.so myapplication following real-world use-case adding v4l2-support layer v4l1-only applications, intercepting ioctl:
ld_preload=/usr/local/lib/libv4l/v4l1compat.so camorama to inject symbols running processes, checkout out this answer.
Comments
Post a Comment