From patchwork Fri Dec 13 07:13:03 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: 102956 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 64ECD3858C35 for ; Fri, 13 Dec 2024 07:14:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64ECD3858C35 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=G6F+IfX1 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by sourceware.org (Postfix) with ESMTPS id BD0D83858C32 for ; Fri, 13 Dec 2024 07:13:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD0D83858C32 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 BD0D83858C32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::2e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734073997; cv=none; b=EayBXs11tJhl7sWZWELdh/jIaNuuVn1ACn5RdazEJoHEId0vJ9wyuutMW5gpBc657ou2KytIJvwby4R8pA/LCAesfhZUx6AcEdb71ZuolCHf/E/gqdQiXTN/QWEl4pRdB7d9i0IAykoShI4VNncAjaqL/trEm7/UTUFq3EBq7Ok= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734073997; c=relaxed/simple; bh=zLTElEp3qvgLnvFq71I4VbVt5RfPQ+OBSKqADlYAqTQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=cV10mjLr7Zo3k2p4tjn2eHnWiMkrjEDq1s1YR+wh5Tsxx3TseJw5Oe7FQdILjNiyBVA7ZW5loRbl+fTZGsY+YVnZEdgmODbeelk+jGOarNCPyObSn4BKAcOKodsJkobmjRkpITr2j/HHMBwyidu5RaF09ca57wyVp32nqTyUGy8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD0D83858C32 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-29645a83b1bso728398fac.1 for ; Thu, 12 Dec 2024 23:13:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734073997; x=1734678797; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GMzg2S/Lim7KmHU8fpo662+q0bjf0H+6xMQs6YNAdjw=; b=G6F+IfX1CRV2UM7HgzMidZgVUEeXhpW/n0syOKoeVQD++MZBj4hvocETvFjkkh59io mD6DS5scXLsSoYdamlYA4TZla7fn/eXccwNM4XCIKw2BV1uJJ9+Qyi3NwcyEPZCKXJp9 WjUIosY1fMBylmZL1izn/aBVqCUzLQn3v2n75itix5eZrkuMrE6H1x77AZxpduIKv0me PRb+cGvQFKDOnwJ2fuv3W5mt439s0rk8KO+j/zCzuLjr/tJkhpLOpw3Cpr/Ptvg8kwA5 BzFux5ya0YMg9I7A7/HA/F7vSW9hZa3msOHHayS2hxHuWUCxVQ4Re+Ba10hOnFPEesp8 WOOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734073997; x=1734678797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GMzg2S/Lim7KmHU8fpo662+q0bjf0H+6xMQs6YNAdjw=; b=HpTRBh1Mv13qIUMin6AProRWNzCR5El6+FihD3A5MhTHyByK/xQ/btAfoZhdhXPb7l vUihNPV6wFaEsqkgS0bJ7V8HO8wMQGE8dJPqTFA/C0LDBtCSVZStToA7lYZ20iMWhhZ8 AGH3nhL/iydOMXbxrsgBlv7h+DXTekTxeKQ00oXj3+Nzv61tcbs/UV+yJ5YtfwWRkIXG B3LxQ9YK4kETvmm5Zm68TskMeH+4vFBYUwmpGaIZQEewVTr+xDhQLFRIJ8qOoDaOyEq7 1Cctc86MrX4ClpN4hjc0cvCZ0Vl7muJGNHqq34fiaJf+llXvZj6Id1duD+GZP+aCqu2Z jQwg== X-Gm-Message-State: AOJu0YzE1kRGDjGZF4hJVA76zB8Jhmt4bXUuQRr0gCZ9W2n3E4npcURb 3RdTd9NbCRIx0j78jdb+YciZP6ggf0thGhJb0PuhNqIZExndacvE X-Gm-Gg: ASbGncvZeJyIgBl+M2GeQDActdrZibUT6JEszMo++yyqEHC4zEC4EQZ5OGWILdXggtf TUdZwiJgXKowVwCGt4ppg5ECctRHcf+RFLo5rWTLk/YGAp7zELjlgB+tb8s0XQslV23gIu3dA9n lGR0EOsutMKjd6OX1oZBl/y9SXPGAwsJkYzhakOaPcZGZ1miMyHaw/TS9Mf+yzI7W55y5zz6/o+ UkZc0544lrRHZ15o4Lt2LI/MQnMSctJid43uE7QC2r0w8Zcxz6E8WfJ5gQDJjvGC+BTcTyJvn0H zd+qcyheJDNnH+a0 X-Google-Smtp-Source: AGHT+IHrmXgM8xf+p8OTFadmOWvZLyKAlmcxWDMP0zFLQD2CNw8fQyhLRuhUQ9FDtXKYLf1ymNkfgg== X-Received: by 2002:a05:6870:f814:b0:29e:3bea:7e55 with SMTP id 586e51a60fabf-2a3ac8b8af9mr1181964fac.26.1734073996850; Thu, 12 Dec 2024 23:13:16 -0800 (PST) Received: from gnu-tgl-3.localdomain ([172.58.27.218]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-29f567610f5sm4827066fac.25.2024.12.12.23.13.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 23:13:16 -0800 (PST) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id E493FC0312; Fri, 13 Dec 2024 15:13:10 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org Subject: [PATCH 03/10] ifuncmain9.c: Return EXIT_UNSUPPORTED for GCC 5 or older Date: Fri, 13 Dec 2024 15:13:03 +0800 Message-ID: <20241213071310.2054769-4-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241213071310.2054769-1-hjl.tools@gmail.com> References: <20241213071310.2054769-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3019.9 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~patchwork=sourceware.org@sourceware.org Since elf/ifuncmain9.c fails at run-time when compiled with GCC 5, return EXIT_UNSUPPORTED for GCC 5 or older. Signed-off-by: H.J. Lu Reviewed-by: Sam James --- elf/ifuncmain9.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/elf/ifuncmain9.c b/elf/ifuncmain9.c index 43011452b7..1f34c81dc2 100644 --- a/elf/ifuncmain9.c +++ b/elf/ifuncmain9.c @@ -20,8 +20,9 @@ #include -# include -# include +#include +#include +#include /* Do not use the test framework, so that the process setup is not disturbed. */ @@ -53,6 +54,10 @@ static int magic (void) __attribute__ ((ifunc ("resolver"))); int main (void) { +#if !__GNUC_PREREQ (6, 0) + return EXIT_UNSUPPORTED; +#endif + bool errors = false; if (implementation_called != 0)