13 extern struct tls_obj tls_registry
[];
15 #define TLS_REGISTER(x) \
16 static void __attribute__((constructor)) \
17 tls_register_##x (void) \
20 for (i = 0; tls_registry[i].name; ++i); \
21 tls_registry[i].name = #x; \
22 tls_registry[i].addr = (uintptr_t) &x; \
23 tls_registry[i].size = sizeof (x); \
24 tls_registry[i].align = __alignof__ (x); \