-
Notifications
You must be signed in to change notification settings - Fork 9
Description
sometimes apps break becasue they read themselves, like examples:
Would be great if we had the option to set sharun as the dynamic linker, the logic would be like this:
-
lib4binwould runpatchelf --set-interpreter /tmp/.sharuninstead of making hardlinks. -
The binary would be copied to
${SHARUN_DIR}/bininstead of${SHARUN-DIR}/shared/bin -
When sharun is the
AppRunit would copy itself to/tmp/.sharunbefore jumping to exec the binaries. -
Then when
/tmp/.sharunis executed by the kernel, it would figure out where the dynamic linker is by checkingSHARUN_DIRand do the rest of stuff it already does.
I don't think we need to make this random, since sharun already is a static binary we can pick a fixed name, then sharun would be responsible for just make sure that /tmp/.sharun is present.
It may also be possible to glue sharun into the binary itself, polyfill glibc does this already, but it is likely this will break some binaries though.