public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/29776] New: elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10
@ 2022-11-11 15:47 fweimer at redhat dot com
  2022-11-12  1:13 ` [Bug dynamic-link/29776] " amodra at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2022-11-11 15:47 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29776

            Bug ID: 29776
           Summary: elf/tst-tlsopt-powerpc fails when compiled with
                    -mcpu=power10
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
                CC: amodra at gmail dot com, rajis at linux dot ibm.com
  Target Milestone: ---
            Target: powerpc64le-linux-gnu

tls_get_addr_opt_test in sysdeps/powerpc/mod-tlsopt-powerpc.c contains:

#ifdef __powerpc64__
  register unsigned long thread_pointer __asm__ ("r13");
  asm ("addi %0,2,foo@got@tlsgd" : "=r" (tls_arg));
#else

If I'm not mistaken, this assumes that r2 is the TOC register. However, when
building in PCREL mode (e.g., with CC="gcc -mcpu=power10"), there is no TOC
register for this function. In fact, r2 is zero, and we get a crash for the
tls_arg->ti_module != 0 check.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-14 11:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 15:47 [Bug dynamic-link/29776] New: elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 fweimer at redhat dot com
2022-11-12  1:13 ` [Bug dynamic-link/29776] " amodra at gmail dot com
2022-11-13 19:33 ` rajis at linux dot ibm.com
2022-11-14 11:15 ` fweimer at redhat dot com
2022-11-14 11:37 ` amodra at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).