elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776)

Supports pcrel addressing of TLS GOT entry.  Also tweak the non-pcrel
asm constraint to better reflect how the reg is used.

(cherry picked from commit 94628de778)
This commit is contained in:
Alan Modra 2022-11-12 11:20:31 +10:30 committed by Florian Weimer
parent e14a91e59d
commit d0e2ac0c59
2 changed files with 6 additions and 1 deletions

1
NEWS
View File

@ -135,6 +135,7 @@ The following bugs are resolved with this release:
[29657] libc: Incorrect struct stat for 64-bit time on linux/generic
platforms
[29771] Restore IPC_64 support in sysvipc *ctl functions
[29776] elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10
Version 2.34

View File

@ -24,7 +24,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"