Skip to main content

loader_alias

Function loader_alias 

Source
fn loader_alias(host_interp: &[u8], name: &[u8]) -> Option<Vec<u8>>
Expand description

A symlink to host_interp whose basename is the program’s, for execve.

The kernel names a process after the basename of the path it exec’d and exposes that path as AT_EXECFN. Exec’ing a loader directly would make every dynamic program show up as ld-linux-x86-64.so.2 or l, so the loader is reached through <alias dir>/<hash of loader>/<program name> instead. One alias per (loader, name), created on first use; the directory lives for the supervisor’s life (see alias_dir).

§Arguments

  • host_interp - Host path of the loader or the dynamic loader.
  • name - Name to give the alias, or a path whose last component is taken.

§Returns

The alias path, or None when the directory or link cannot be created.