public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/31640] New: POWER10 ld.so crashes in elf_machine_load_address with GCC 14
@ 2024-04-13 12:10 fweimer at redhat dot com
  2024-04-13 12:11 ` [Bug dynamic-link/31640] " fweimer at redhat dot com
  2024-04-14  9:50 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2024-04-13 12:10 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 31640
           Summary: POWER10 ld.so crashes in elf_machine_load_address with
                    GCC 14
           Product: glibc
           Version: 2.40
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: fweimer at redhat dot com
          Reporter: fweimer at redhat dot com
                CC: bergner at linux dot ibm.com
  Target Milestone: ---
            Target: powerpc64le-linux-gnu

When built with GCC 14, ld.so crashes in elf_machine_load_address because the
current implementation assumes that r2 still has the kernel-provided value:

static inline Elf64_Addr
elf_machine_load_address (void)
{
  Elf64_Addr ret;

  /* The first entry in .got (and thus the first entry in .toc) is the
     link-time TOC_base, ie. r2.  So the difference between that and
     the current r2 set by the kernel is how far the shared lib has
     moved.  */
  asm ( "       ld      %0,-32768(2)\n"
        "       subf    %0,%0,2\n"
        : "=r"  (ret));
  return ret;
}

I don't think that's necessarily true in PCREL mode, so this is a glibc bug.

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

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

end of thread, other threads:[~2024-04-14  9:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-13 12:10 [Bug dynamic-link/31640] New: POWER10 ld.so crashes in elf_machine_load_address with GCC 14 fweimer at redhat dot com
2024-04-13 12:11 ` [Bug dynamic-link/31640] " fweimer at redhat dot com
2024-04-14  9:50 ` fweimer at redhat 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).