diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/aarch64/pthread_arch.h | 5 | ||||
-rw-r--r-- | arch/aarch64/reloc.h | 2 | ||||
-rw-r--r-- | arch/arm/pthread_arch.h | 7 | ||||
-rw-r--r-- | arch/arm/reloc.h | 2 | ||||
-rw-r--r-- | arch/mips/pthread_arch.h | 1 | ||||
-rw-r--r-- | arch/mips64/pthread_arch.h | 1 | ||||
-rw-r--r-- | arch/mipsn32/pthread_arch.h | 1 | ||||
-rw-r--r-- | arch/or1k/pthread_arch.h | 1 | ||||
-rw-r--r-- | arch/powerpc/pthread_arch.h | 1 | ||||
-rw-r--r-- | arch/powerpc64/pthread_arch.h | 1 | ||||
-rw-r--r-- | arch/sh/pthread_arch.h | 5 | ||||
-rw-r--r-- | arch/sh/reloc.h | 2 |
12 files changed, 19 insertions, 10 deletions
diff --git a/arch/aarch64/pthread_arch.h b/arch/aarch64/pthread_arch.h index b2e2d8f1..e8499d8e 100644 --- a/arch/aarch64/pthread_arch.h +++ b/arch/aarch64/pthread_arch.h @@ -2,10 +2,11 @@ static inline struct pthread *__pthread_self() { char *self; __asm__ __volatile__ ("mrs %0,tpidr_el0" : "=r"(self)); - return (void*)(self + 16 - sizeof(struct pthread)); + return (void*)(self - sizeof(struct pthread)); } #define TLS_ABOVE_TP -#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) - 16) +#define GAP_ABOVE_TP 16 +#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread)) #define MC_PC pc diff --git a/arch/aarch64/reloc.h b/arch/aarch64/reloc.h index 51b66e23..40cf0b28 100644 --- a/arch/aarch64/reloc.h +++ b/arch/aarch64/reloc.h @@ -10,7 +10,7 @@ #define NO_LEGACY_INITFINI -#define TPOFF_K 16 +#define TPOFF_K 0 #define REL_SYMBOLIC R_AARCH64_ABS64 #define REL_GOT R_AARCH64_GLOB_DAT diff --git a/arch/arm/pthread_arch.h b/arch/arm/pthread_arch.h index 6657e198..8f2ae8f8 100644 --- a/arch/arm/pthread_arch.h +++ b/arch/arm/pthread_arch.h @@ -5,7 +5,7 @@ static inline pthread_t __pthread_self() { char *p; __asm__ __volatile__ ( "mrc p15,0,%0,c13,c0,3" : "=r"(p) ); - return (void *)(p+8-sizeof(struct pthread)); + return (void *)(p-sizeof(struct pthread)); } #else @@ -21,12 +21,13 @@ static inline pthread_t __pthread_self() extern uintptr_t __attribute__((__visibility__("hidden"))) __a_gettp_ptr; register uintptr_t p __asm__("r0"); __asm__ __volatile__ ( BLX " %1" : "=r"(p) : "r"(__a_gettp_ptr) : "cc", "lr" ); - return (void *)(p+8-sizeof(struct pthread)); + return (void *)(p-sizeof(struct pthread)); } #endif #define TLS_ABOVE_TP -#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) - 8) +#define GAP_ABOVE_TP 8 +#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread)) #define MC_PC arm_pc diff --git a/arch/arm/reloc.h b/arch/arm/reloc.h index b175711d..4b00bf64 100644 --- a/arch/arm/reloc.h +++ b/arch/arm/reloc.h @@ -16,7 +16,7 @@ #define NO_LEGACY_INITFINI -#define TPOFF_K 8 +#define TPOFF_K 0 #define REL_SYMBOLIC R_ARM_ABS32 #define REL_GOT R_ARM_GLOB_DAT diff --git a/arch/mips/pthread_arch.h b/arch/mips/pthread_arch.h index e5812655..5fea15ad 100644 --- a/arch/mips/pthread_arch.h +++ b/arch/mips/pthread_arch.h @@ -11,6 +11,7 @@ static inline struct pthread *__pthread_self() } #define TLS_ABOVE_TP +#define GAP_ABOVE_TP 0 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000) #define DTP_OFFSET 0x8000 diff --git a/arch/mips64/pthread_arch.h b/arch/mips64/pthread_arch.h index e5812655..5fea15ad 100644 --- a/arch/mips64/pthread_arch.h +++ b/arch/mips64/pthread_arch.h @@ -11,6 +11,7 @@ static inline struct pthread *__pthread_self() } #define TLS_ABOVE_TP +#define GAP_ABOVE_TP 0 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000) #define DTP_OFFSET 0x8000 diff --git a/arch/mipsn32/pthread_arch.h b/arch/mipsn32/pthread_arch.h index e5812655..5fea15ad 100644 --- a/arch/mipsn32/pthread_arch.h +++ b/arch/mipsn32/pthread_arch.h @@ -11,6 +11,7 @@ static inline struct pthread *__pthread_self() } #define TLS_ABOVE_TP +#define GAP_ABOVE_TP 0 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000) #define DTP_OFFSET 0x8000 diff --git a/arch/or1k/pthread_arch.h b/arch/or1k/pthread_arch.h index 7decd769..521b9c53 100644 --- a/arch/or1k/pthread_arch.h +++ b/arch/or1k/pthread_arch.h @@ -12,6 +12,7 @@ static inline struct pthread *__pthread_self() } #define TLS_ABOVE_TP +#define GAP_ABOVE_TP 0 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread)) #define MC_PC regs.pc diff --git a/arch/powerpc/pthread_arch.h b/arch/powerpc/pthread_arch.h index 7c5c4fad..79e5a09f 100644 --- a/arch/powerpc/pthread_arch.h +++ b/arch/powerpc/pthread_arch.h @@ -11,6 +11,7 @@ static inline struct pthread *__pthread_self() } #define TLS_ABOVE_TP +#define GAP_ABOVE_TP 0 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000) #define DTP_OFFSET 0x8000 diff --git a/arch/powerpc64/pthread_arch.h b/arch/powerpc64/pthread_arch.h index 2f976fe2..37b75e29 100644 --- a/arch/powerpc64/pthread_arch.h +++ b/arch/powerpc64/pthread_arch.h @@ -6,6 +6,7 @@ static inline struct pthread *__pthread_self() } #define TLS_ABOVE_TP +#define GAP_ABOVE_TP 0 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000) #define DTP_OFFSET 0x8000 diff --git a/arch/sh/pthread_arch.h b/arch/sh/pthread_arch.h index 2756e7ec..41fefacf 100644 --- a/arch/sh/pthread_arch.h +++ b/arch/sh/pthread_arch.h @@ -2,10 +2,11 @@ static inline struct pthread *__pthread_self() { char *self; __asm__ __volatile__ ("stc gbr,%0" : "=r" (self) ); - return (struct pthread *) (self + 8 - sizeof(struct pthread)); + return (struct pthread *) (self - sizeof(struct pthread)); } #define TLS_ABOVE_TP -#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) - 8) +#define GAP_ABOVE_TP 8 +#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread)) #define MC_PC sc_pc diff --git a/arch/sh/reloc.h b/arch/sh/reloc.h index 0238ce07..a1f16cb1 100644 --- a/arch/sh/reloc.h +++ b/arch/sh/reloc.h @@ -20,7 +20,7 @@ #define LDSO_ARCH "sh" ENDIAN_SUFFIX FP_SUFFIX ABI_SUFFIX -#define TPOFF_K 8 +#define TPOFF_K 0 #define REL_SYMBOLIC R_SH_DIR32 #define REL_OFFSET R_SH_REL32 |