diff --git a/folly/lang/Keep.h b/folly/lang/Keep.h index 759dc8afb69..b404270df0f 100644 --- a/folly/lang/Keep.h +++ b/folly/lang/Keep.h @@ -56,7 +56,7 @@ // This way, the linker will see at least one reference to the kept section, // and so will not throw it out. #if __GNUC__ && __linux__ -#define FOLLY_KEEP [[gnu::section(".text.folly.keep")]] +#define FOLLY_KEEP [[gnu::section(".text.folly.keep"), gnu::used, gnu::retain]] #else #define FOLLY_KEEP #endif