The documentation for std::env::current_exe claims that a symbolic link on Linux can cause an incorrect value to be returned. This isn't true, however; a hard link must be used. The ld command given in the example actually creates a hard link since -s isn't passed.