On 21-07-2022 18:13, ( wrote: > Okay, another (hopefully more coherent) proposal: Patch in a > > ``` > extern char *__guix_shell_path; > ``` > > And then, we use a linker script to provide the definition of > __guix_shell_path at linking time. (Unfortunately there's no way to do > this with a flag, afaik...) We could compile a '__guix_shell_path = "/..."' during the compilation of the package (as a .o) and wrap gcc to insert it to the CLI arguments, no linker scripts required.  Not all linkers support linker scripts, e.g. mold doesn't from what I've read because they make the linker slower. Greetings, Maxime.