public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "i at maskray dot me" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29662] s390 glibc wrongly assumes GOT[0] is _DYNAMIC
Date: Mon, 21 Nov 2022 09:28:55 +0000	[thread overview]
Message-ID: <bug-29662-131-nrc2ib5ABD@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29662-131@http.sourceware.org/bugzilla/>

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

--- Comment #5 from Fangrui Song <i at maskray dot me> ---
(In reply to Rui Ueyama from comment #4)
> GOT[0] is indeed redundant, but removing dependencies to that entry is not
> probably productive at this point, because it is already part of the
> standard psABI of s390x. Even if we remove all dependencies to GOT[0] from
> glibc, there may be code that depends on it, and they are not technically
> wrong because GOT[0]'s value is guaranteed by the psABI, so we can't remove
> GOT[0] anyway.

It is not meaningful for a linker supporting this to remove the support (it
breaks linking glibc[1]) but it is meaningful for glibc. At this point glibc
can use the same implementation for many ports but s390x is one of the
stragglers. Moving away from it is a small code clean-up


[1] lld does not set _GLOBAL_OFFSET_TABLE_ for many architectures, and that
appears to work fine. I know glibc aarch64 used it, so I submitted a patch to
remove it, and that was the only instance I have seen. musl, FreeBSD rtld,
NetBSD rtld, etc use approaches that don't need _GLOBAL_OFFSET_TABLE_[0]. The
s390x psABI specifying _GLOBAL_OFFSET_TABLE_[0] really mixes psABI with glibc
internals.

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

      parent reply	other threads:[~2022-11-21  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08  1:28 [Bug libc/29662] New: " rui314 at gmail dot com
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 [this message]

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-nrc2ib5ABD@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).