__attribute__((force_export))

Prevents a function or static variable from being dead-stripped.

Syntax
  function-declaration  __attribute__((force_export));
  
  function-definition  __attribute__((force_export));
  
  variable-declaration  __attribute__((force_export));
  
  variable-definition  __attribute__((force_export));
  
Remarks

This attribute specifies that the linker must not dead-strip a function or static variable even if the linker determines that the rest of the program does not refer to the object.