diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/pthread_arch.h | 5 | ||||
-rw-r--r-- | arch/sh/reloc.h | 2 |
2 files changed, 4 insertions, 3 deletions
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 |