diff --git a/reopen.h b/reopen.h index 7572ba46..2cd902e8 100644 --- a/reopen.h +++ b/reopen.h @@ -70,6 +70,9 @@ #ifndef __hot # if defined(NDEBUG) && (defined(__GNUC__) && !defined(__clang__)) # define __hot __attribute__((hot, optimize("O3"))) +# elif defined(__GNUC__) + /* cland case, just put frequently used functions in separate section */ +# define __cold __attribute__((section("text.hot"))) # else # define __hot # endif @@ -80,7 +83,7 @@ # define __cold __attribute__((cold, optimize("Os"))) # elif defined(__GNUC__) /* cland case, just put infrequently used functions in separate section */ -# define __cold __attribute__((section("text.cold"))) +# define __cold __attribute__((section("text.unlikely"))) # else # define __cold # endif