1 2 3 4 5 6 7 8 9 10 11
#include <tls.h> __thread int b[2] __attribute__ ((tls_model ("initial-exec"))); extern int foo (void); int bar (void) { return foo () + b[0]; }