public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rui314 at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29662] New: s390 glibc wrongly assumes GOT[0] is _DYNAMIC
Date: Sat, 08 Oct 2022 01:28:19 +0000	[thread overview]
Message-ID: <bug-29662-131@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 29662
           Summary: s390 glibc wrongly assumes GOT[0] is _DYNAMIC
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: rui314 at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The following piece of code in glibc/s390-64 assumes that the first entry of
.got is the address of .dynamic. There's no such guarantee in the psABI, so it
is arguably wrong. It just happens that GNU ld does that.

https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/s390/s390-64/dl-machine.h;h=74be0552dc42246df8ee24f871a2391798e3441b;hb=HEAD#l50

We had very similar code for ARM64, but that has been replaced in
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=43d06ed218fc8be58987bdfd00e21e5720f0b862.
I think we want to do the same thing for s390.

I noticed this issue when porting my mold linker to s390x.

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

             reply	other threads:[~2022-10-08  1:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08  1:28 rui314 at gmail dot com [this message]
2022-10-12 14:32 ` [Bug libc/29662] " krebbel at linux dot ibm.com
2022-10-13  1:21 ` rui314 at gmail dot com
2022-11-21  6:21 ` i at maskray dot me
2022-11-21  7:56 ` rui314 at gmail dot com
2022-11-21  9:28 ` i at maskray dot me

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-29662-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).