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 GNU and Linux and (AIX or Android or Cygwin or DragonFly BSD or Emscripten or FreeBSD or Fuchsia or GNU/Hurd or Haiku or Hermit or Horizon or illumos or L4Re or Linux or NetBSD or NuttX or OpenBSD or QNX SDP 7.x or QNX SDP 8.0+ or Redox OS or RTEMS OS or Solaris or VxWorks) 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.