[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/libc/glibc/glibc-2.22/elf/tls-macros.h b/ap/libc/glibc/glibc-2.22/elf/tls-macros.h
new file mode 100644
index 0000000..e25e33b
--- /dev/null
+++ b/ap/libc/glibc/glibc-2.22/elf/tls-macros.h
@@ -0,0 +1,25 @@
+/* Macros to support TLS testing in times of missing compiler support. */
+
+#define COMMON_INT_DEF(x) \
+ asm (".tls_common " #x ",4,4")
+/* XXX Until we get compiler support we don't need declarations. */
+#define COMMON_INT_DECL(x)
+
+/* XXX This definition will probably be machine specific, too. */
+#define VAR_INT_DEF(x) \
+ asm (".section .tdata\n\t" \
+ ".globl " #x "\n" \
+ ".balign 4\n" \
+ #x ":\t.long 0\n\t" \
+ ".size " #x ",4\n\t" \
+ ".previous")
+/* XXX Until we get compiler support we don't need declarations. */
+#define VAR_INT_DECL(x)
+
+#include_next <tls-macros.h>
+
+ /* XXX Each architecture must have its own asm for now. */
+#if !defined TLS_LE || !defined TLS_IE \
+ || !defined TLS_LD || !defined TLS_GD
+# error "No support for this architecture so far."
+#endif