HomeFreeBSD

Resolve relative argv0 for direct exec mode to absolute path for AT_EXECPATH.

Description

Resolve relative argv0 for direct exec mode to absolute path for AT_EXECPATH.

We know the binary relative name and can reliably calculate cwd path.
Because realpath(3) was already linked into ld-elf.so.1, reuse it
there to resolve dots and dotdots making the path more canonical.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D23014

Details

Provenance
kibAuthored on
Differential Revision
D23014: Resolve relative argv0 for direct exec mode to absolute path for AT_EXECPATH.
Parents
rS356547: MFC r356300, r356503:
Branches
Unknown
Tags
Unknown