This is more of a hacky feature request / "could it work" question
I really like grun -c, and it feels like it should be possible to use the same ideas to automatically emulate the proper prefix path for fast on-the-fly translation somehow.
For interpreter:
Check if the interpreter isn't either statically-linked, /system/bin/linker64, or /data/data/com.termux/files/usr/glibc/lib/ld*
If not, then create a copy with the patchelf
Do the same thing with all DT_NEEDED libraries transitively (maybe create a dedicated rpath copy for this)
For automatic /tmp, /etc, /share, /opt, /usr reroute:
(for non-static libraries, still using libc without inlined syscalls) - you could offer a libwrap.so style hook+redirect that just rewrites all paths to prepend the prefix /data/data/com.termux/files/usr/glibc. This could even be something that you can specify as a filter, or only replay if the initial call fails.
(otherwise) - offer a proot/ptrace style hooks (or tell them to use proot in a proper distro for e.g.)
Problem description
This is more of a hacky feature request / "could it work" question
I really like
grun -c
, and it feels like it should be possible to use the same ideas to automatically emulate the proper prefix path for fast on-the-fly translation somehow.For interpreter:
For automatic /tmp, /etc, /share, /opt, /usr reroute:
System information
termux-info: