public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/29776] New: elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10
Date: Fri, 11 Nov 2022 15:47:46 +0000	[thread overview]
Message-ID: <bug-29776-131@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2022-11-11 15:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 15:47 fweimer at redhat dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29776-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).