diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | sysdeps/powerpc/mod-tlsopt-powerpc.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS index 986578ab04..539ff38bb0 100644 --- a/NEWS +++ b/NEWS @@ -69,6 +69,7 @@ The following bugs are resolved with this release: platforms [29730] broken y2038 support in fstatat on MIPS N64 [29771] Restore IPC_64 support in sysvipc *ctl functions + [29776] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 Version 2.35 diff --git a/sysdeps/powerpc/mod-tlsopt-powerpc.c b/sysdeps/powerpc/mod-tlsopt-powerpc.c index 2a82e53baf..d941024963 100644 --- a/sysdeps/powerpc/mod-tlsopt-powerpc.c +++ b/sysdeps/powerpc/mod-tlsopt-powerpc.c @@ -22,7 +22,11 @@ tls_get_addr_opt_test (void) tls_index *tls_arg; #ifdef __powerpc64__ register unsigned long thread_pointer __asm__ ("r13"); - asm ("addi %0,2,foo@got@tlsgd" : "=r" (tls_arg)); +# ifdef __PCREL__ + asm ("paddi %0,0,foo@got@tlsgd@pcrel,1" : "=b" (tls_arg)); +# else + asm ("addi %0,2,foo@got@tlsgd" : "=b" (tls_arg)); +# endif #else register unsigned long thread_pointer __asm__ ("r2"); asm ("bcl 20,31,1f\n1:\t" |