From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 203293857C5A; Mon, 21 Nov 2022 09:28:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 203293857C5A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669022936; bh=tn44BHUFteaJTK/tiVxTGX9ys8ir5kEHEwp/iJ/Opyc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kCp2pE2s6F+1Xj5SEQtHOgnqOrcy6Z+htjyjmgp6WSlkM9awEV5+KHF354KgD3Zsz qcXD8bG41Eyfu+0/7QxAuq7KnsPzCOEGJFpDHjK6ZWMYgqQ3zbpFO+Ffd/9aG4Gcha FkKXWdF7aKt9pAMl8GyWd3oasIou9RBCgGS3JoKY= From: "i at maskray dot me" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: i at maskray dot me X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: NOTABUG X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29662 --- Comment #5 from Fangrui Song --- (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 remo= ve > 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]. T= he s390x psABI specifying _GLOBAL_OFFSET_TABLE_[0] really mixes psABI with gli= bc internals. --=20 You are receiving this mail because: You are on the CC list for the bug.=