From patchwork Tue May 21 02:30:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1937193 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=TDQ66fT8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vjz2g0sB1z20PS for ; Tue, 21 May 2024 12:31:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 140BE3858414 for ; Tue, 21 May 2024 02:31:20 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 4DBF53858D1E for ; Tue, 21 May 2024 02:31:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DBF53858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4DBF53858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716258663; cv=none; b=ixTGNMvcFJJK2veG6oSTieHoM2FZimBUp7OXjrZhOoBa4oqcX4B4WabmXr6vRqGQdnih036OLwLr2i1LZBFKae5LEkLuCYazxpDGuNX47LC+QjjIfWnKwjyczjnWhAT1M+s5703IvCe9cbNpEK49qaYkID7wLy/+sIWBEDVnX18= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716258663; c=relaxed/simple; bh=G63JG/cr5EdBzRcP954rPM7G0f2JmZ9NvaUgK66dHg0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dxPoAuY7yH7/2iZ4hkvUg7X3x0iclUwuIQCCChG6V+hEnhHGw7jNoMXNwlzzYlY85cCRP9f+RzPbL3aaqQEwUqqeSH+Jy4y+raEddbKxlL8dqiHm6V3f9VfruMdSPwYpOfMJ39Yr2sCv9tMMmXsSLTCpSVE+Jag4FxlO7Dq1Az0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6f6b1ac1e90so989618b3a.1 for ; Mon, 20 May 2024 19:31:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716258660; x=1716863460; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=3gntSau9hVI0wSX0XcScKQYAc52ddBAIy7GZIPSBz6A=; b=TDQ66fT8sL2OHiyb+m/Kg+W5lChSfy41013sxe1CpyZf7GxmyM6FDT1J2Zmfj6jpY1 qIW0ACoRHUz6v9vzLLAf6w5Y3qvtW2DdSPGvmq5nqBHXJaJBgyhm/TynBDahqoejn8ki 0Y6YFdu/xHH/AtWXNzqo34pgsL8nu2eEPOtwZeN6DC4s7MMZlywmrE/BCVDsRH6uDpLi MNNdjX4TtjdyEGkUW5iYFkb0Kq7iLXXs5etUjDaWFUeljlgiEAmFqVHNfb8/5YNsG5d0 +Q+0yFxXkJEvdJKzl6b+drQnS35iRZhqGX/8NhnVYdTWPZA83/cGVz1+OKcTwMxbIPLl g8oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716258660; x=1716863460; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3gntSau9hVI0wSX0XcScKQYAc52ddBAIy7GZIPSBz6A=; b=bRFU1Mz6ZMI1+5ahnpjmJ6noCLMW5pmNP29pW9yy8S3yvliGGVJZmxqURkhhTCfzDS zJO9kxuQyJdLz26Bs1JlOCDB4dL08McvIHAis5MhL2DhmV7fq5Fs2glFRVGL788YcRyR d84cCs6xATf2GiyzZArwcYqKYrzfANyt5P8295Wae4arvElrlC6XXD2wR/cLI93YMoZc Veyulos4tWmietTAqjOJPHjj01uMKqK+aVvVPYPmyq8icPL/YYGAI70lN8iOpd+Mbhry CLR10c3O7v565D4vec5Te/VQ0OuwUmyUtKj64wgdc0kkLKRZABD6yDO5ubfTwCzKhj4o XpAQ== X-Gm-Message-State: AOJu0YyOoBcnFFqZ88wxTKRWb4y8imzwWOoo05m4VdmwN4eD0Z/GsDP1 pS5+tIN5zgh0HY8kN93Qpcux3dR2mXqbQO9PRB7r+jEt1HyPCCFbbSaWNA== X-Google-Smtp-Source: AGHT+IF+6R6uPafOy1cDvnAxxrWUg5bPBpqp/J4ss7xiV5DNt2+3tqzngjS0RfXEKJzUvDIsNGGWXQ== X-Received: by 2002:a05:6a21:32a7:b0:1af:b89b:a7f1 with SMTP id adf61e73a8af0-1b1ca452895mr10708483637.27.1716258659780; Mon, 20 May 2024 19:30:59 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.56.168.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2b26593sm19782539b3a.201.2024.05.20.19.30.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 19:30:59 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 5D96E74019D for ; Mon, 20 May 2024 19:30:58 -0700 (PDT) From: "H.J. Lu" To: libc-alpha@sourceware.org Subject: [PATCH] Change _IO_stderr_/_IO_stdin_/_IO_stdout to compat symbols [BZ #31766] Date: Mon, 20 May 2024 19:30:58 -0700 Message-ID: <20240521023058.1659308-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3022.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Since Glibc never provides symbol binary compatibility for relocatable files, fix BZ #31766 by changing _IO_stderr_/_IO_stdin_/_IO_stdout to compat symbols. Signed-off-by: H.J. Lu Reviewed-by: Sunil K Pandey --- libio/oldstdfiles.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libio/oldstdfiles.c b/libio/oldstdfiles.c index 30581dfad4..a6a908a248 100644 --- a/libio/oldstdfiles.c +++ b/libio/oldstdfiles.c @@ -48,6 +48,10 @@ DEF_STDFILE(_IO_stdin_, 0, 0, _IO_NO_WRITES); DEF_STDFILE(_IO_stdout_, 1, &_IO_stdin_, _IO_NO_READS); DEF_STDFILE(_IO_stderr_, 2, &_IO_stdout_, _IO_NO_READS+_IO_UNBUFFERED); +compat_symbol (libc, _IO_stdin_, _IO_stdin_, GLIBC_2_0); +compat_symbol (libc, _IO_stdout_, _IO_stdout_, GLIBC_2_0); +compat_symbol (libc, _IO_stderr_, _IO_stderr_, GLIBC_2_0); + #if defined __GNUC__ && __GNUC__ >= 2 #include