From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A6643858D37; Mon, 12 Feb 2024 10:53:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A6643858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707735185; bh=y/nfmtEEqQrOKRcoGhNCGZk+F/9nDF8Olev5n1wWJL4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UKvpvxofFIK5as2wL0WGO73LEECPEiaXuETucHQ18snWAwvj3qGsGgS9p6uM8JIAe CTV524aEpxcuChcnntrvDhJIF6f801JzFRB9RZcDfatcOBu1py9Z+1faWBn8su0n9m XCBfXcyuRKyLJ+3GcVi1vTzVqLqZWLVB++GHj6x4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113874] GNU2 TLS descriptor calls do not follow psABI on x86_64-linux-gnu Date: Mon, 12 Feb 2024 10:53:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113874 --- Comment #12 from Jakub Jelinek --- (In reply to Florian Weimer from comment #11) > (In reply to Richard Biener from comment #10) > > I think a glibc fix would be very much preferred. >=20 > It's a bit of a maintenance nightmare because we have to update the code > slightly each time new registers are added, and there isn't a good way for > applications to detect whether they run on a compatible glibc. But it is what the ABI of GNU2 TLS says or what even dl-tlsdesc.C says: /* Preserve call-clobbered registers that we modify. Yeah, the fact that it can call user-overloaded malloc significantly complicates stuff, otherwise it would be just a matter of new registers that can be modified while running whatever __tls_get_addr needs and could be changed only when glibc is rebuilt with some newer compiler which starts modifying further ca= ll clobbered registers. But with overloaded malloc it can be just if the overloaded malloc is rebui= lt with newer compiler...=