File tls-no-direct.diff of Package gcc41
--- gcc/config/i386/linux.h
+++ gcc/config/i386/linux.h
@@ -33,8 +33,13 @@
#define DEFAULT_PCC_STRUCT_RETURN 1
/* We arrange for the whole %gs segment to map the tls area. */
+/*
+ This slows down Xen, so take a very small general performance hit
+ for not accessing the %gs segment with negative offsets by making
+ GCC not emit direct accesses to %gs at all.
#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
+*/
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "#"