Skip to main content

ARGV_INIT_ARRAY

Static ARGV_INIT_ARRAY 

Source
#[unsafe(link_section = ".init_array.00099")]
static ARGV_INIT_ARRAY: extern "C" fn(c_int, *const *const u8, *const *const u8)
Available on Linux and GNU and (Linux or Android or FreeBSD or DragonFly BSD or NetBSD or OpenBSD or Cygwin or Solaris or illumos or Emscripten or Haiku or Hermit or L4Re or Fuchsia or Redox OS or VxWorks or Horizon or AIX or QNX Neutrino or GNU/Hurd or RTEMS OS or NuttX) only.
Expand description

glibc passes argc, argv, and envp to functions in .init_array, as a non-standard extension. This allows std::env::args to work even in a cdylib, as it does on macOS and Windows.