From dcf8a205dce59d9249bfd67c7f6145621a188c12 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 6 Nov 2014 17:30:28 -0800 Subject: [PATCH] Fix TLS in benchmarks Linker relaxations were screwing up loading the thread pointer. --- benchmarks/common/crt.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/benchmarks/common/crt.S b/benchmarks/common/crt.S index e35608e..24e3580 100644 --- a/benchmarks/common/crt.S +++ b/benchmarks/common/crt.S @@ -114,8 +114,11 @@ _start: sll sp, sp, STKSHIFT add sp, sp, tp + # offset thread pointer by thread pointer bias lui t0, %tprel_hi(tls_start) + add t0, t0, tp, %tprel_add(tls_start) add t0, t0, %tprel_lo(tls_start) + sub t0, t0, tp sub tp, tp, t0 la t0, _init -- 2.30.2