Crate ctor_bare_macros

Source
Expand description

DO NOT use this crate directly. Use the ctor_bare crate instead.

After attching the register_ctor macro to the given function, a pointer pointing to it will be stored in the .init_array section. When the program is loaded, this section will be linked into the binary. The call_ctors function in the ctor_bare crate will call all the constructor functions in the .init_array section.

See the documentation of the ctor_bare crate for more details.

Attribute Macrosยง

  • Register a constructor function to be called before main.