forked from pool/glibc
Andreas Schwab
ef65d0fef2
- pkey-get-reserved-name.patch: Linux: use reserved name __key in pkey_get (BZ #22797) - aarch64-sys-ptrace-update.patch: linux/aarch64: sync sys/ptrace.h with Linux 4.15 (BZ #22433) - powerpc-sys-ptrace-undefine-macros.patch: powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request - powerpc-sys-ptrace-update.patch: linux/powerpc: sync sys/ptrace.h with Linux 4.15 (BZ #22433, BZ #22807) - netgroup-cache-keys.patch: Fix netgroup cache keys (BZ #22342) - i386-sigaction-sa-restorer.patch: i386: Fix i386 sigaction sa_restorer initialization (BZ #21269) - riscv-tls-init.patch: RISC-V: Do not initialize $gp in TLS macros - riscv-fmax-fmin-nan.patch: RISC-V: fmax/fmin: Handle signalling NaNs correctly (BZ #22884) OBS-URL: https://build.opensuse.org/request/show/590321 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=499
52 lines
1.3 KiB
Diff
52 lines
1.3 KiB
Diff
2018-02-22 DJ Delorie <dj@delorie.com>
|
|
|
|
* sysdeps/riscv/tls-macros.h: Do not initialize $gp.
|
|
|
|
Index: glibc-2.27/sysdeps/riscv/tls-macros.h
|
|
===================================================================
|
|
--- glibc-2.27.orig/sysdeps/riscv/tls-macros.h
|
|
+++ glibc-2.27/sysdeps/riscv/tls-macros.h
|
|
@@ -23,19 +23,9 @@
|
|
#include <sysdep.h>
|
|
#include "dl-tls.h"
|
|
|
|
-#define LOAD_GP \
|
|
- ".option push\n\t" \
|
|
- ".option norelax\n\t" \
|
|
- "la gp, __global_pointer$\n\t" \
|
|
- ".option pop\n\t"
|
|
-
|
|
-#define UNLOAD_GP
|
|
-
|
|
#define TLS_GD(x) \
|
|
({ void *__result; \
|
|
- asm (LOAD_GP \
|
|
- "la.tls.gd %0, " #x "\n\t" \
|
|
- UNLOAD_GP \
|
|
+ asm ("la.tls.gd %0, " #x "\n\t" \
|
|
: "=r" (__result)); \
|
|
__tls_get_addr (__result); })
|
|
|
|
@@ -43,19 +33,15 @@
|
|
|
|
#define TLS_IE(x) \
|
|
({ void *__result; \
|
|
- asm (LOAD_GP \
|
|
- "la.tls.ie %0, " #x "\n\t" \
|
|
+ asm ("la.tls.ie %0, " #x "\n\t" \
|
|
"add %0, %0, tp\n\t" \
|
|
- UNLOAD_GP \
|
|
: "=r" (__result)); \
|
|
__result; })
|
|
|
|
#define TLS_LE(x) \
|
|
({ void *__result; \
|
|
- asm (LOAD_GP \
|
|
- "lui %0, %%tprel_hi(" #x ")\n\t" \
|
|
+ asm ("lui %0, %%tprel_hi(" #x ")\n\t" \
|
|
"add %0, %0, tp, %%tprel_add(" #x ")\n\t" \
|
|
"addi %0, %0, %%tprel_lo(" #x ")\n\t" \
|
|
- UNLOAD_GP \
|
|
: "=r" (__result)); \
|
|
__result; })
|