diff options
Diffstat (limited to 'hurd/translator/procfs')
-rw-r--r-- | hurd/translator/procfs/jkoenig/discussion.mdwn | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hurd/translator/procfs/jkoenig/discussion.mdwn b/hurd/translator/procfs/jkoenig/discussion.mdwn index e71ea02b..aded4225 100644 --- a/hurd/translator/procfs/jkoenig/discussion.mdwn +++ b/hurd/translator/procfs/jkoenig/discussion.mdwn @@ -218,6 +218,20 @@ Needed by glibc's `pldd` tool (commit [[!message-id "alpine.LFD.2.02.1110111111260.2016@akari"]]. Needed by glibc's `stdlib/tst-secure-getenv.c`. +Is it generally possible to use something like the following instead? +Disadvantage is that every program using this needs to be patched. + + #include <dlfcn.h> + [...] + Dl_info DLInfo; + int err = dladdr(&main, &DLInfo); + if (err == 0) + [...] + /* Pathname of shared object that contains address: DLInfo.dli_fname. */ + /* Filter it through realpath. */ + +This is used in `[LLVM]/lib/Support/Unix/Path.inc`. + # `/proc/[PID]/fd/` |