From patchwork Wed Oct 30 22:51:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Indu Bhagat X-Patchwork-Id: 99854 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 AD7073857BA2 for ; Wed, 30 Oct 2024 22:52:05 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id BFB933857BA2 for ; Wed, 30 Oct 2024 22:51:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BFB933857BA2 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BFB933857BA2 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1730328690; cv=pass; b=epcrMxYjaL8H9BpydPrOyWIZ5uPCFdlOlmPmiTLIo9PN/wgtGTdu87C2ygvw/Dt27DvSozjwgX7AoqIZ6jP/FpXi29YUOdwuP8/cV8jccavsRfYhfTdm4ZOCyJgbN9bscW7rcGRHLBAc46Qp1uksNIMAwHmCQIFt0WLenslCKxY= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1730328690; c=relaxed/simple; bh=85vuTURWVWcmnIN6djW7z1/8TRstU113Hv9xKRee/gI=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=vyga7qAHcs77RDIQirSJymvrXox0W9HT1Q3Scpiil4IHL37NoZU2/ZnszRs1b1DHT13G/CKd1VGbZS3VxYjr/zCcTmL6VZQXcdYk5bt01yZqZz4oplyP0iWCiPfVux8y8Dvu9S0rwj6lEbe0v6o5J7lBuF+TJxwgduasSOSUU/c= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49UJBcnb004989; Wed, 30 Oct 2024 22:51:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=/23DzmzG4bsIEFCgECowFMOaiiDTrvK8b2IgKMg0WB8=; b= oXs3ZwZAYPOI61DeYZhDv6iT/Hq6tRBK0d0VvaixRy+qZ5ryKDPf9+9c/4faQ3sS uJEMVkYQBS6tn5kLp2Krrcm4zTs1swJHj/XYC5RVDPvdfnPXRIkAbVoQ0Nhfpk/A LN40Qc1Fj189y2yG6z+LFraTXW1vmxyWAza/k70uFf2tZacZSfNHouNjyHYIHm+9 d9mOtPIzQWqopn9gc93sDAs/Utsl5hftylUpsN6+HFvjnqWjM/9ghD8jgO6GIr4c 9CTBAMbP5tm3Fn/X7x+G9kmazr9gkDZv96oL8PI20q9AULIlWiSoHR93bTnPT79o 9UORNluIabDOwJvtB6zCCw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42grc2156g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Oct 2024 22:51:25 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 49UKxORV011821; Wed, 30 Oct 2024 22:51:25 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 42hnaeq3yj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Oct 2024 22:51:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WO8SUKPWRMdbPPevHj6e3dOmf0IXS1MW04f8RL/d/t9hy0giSXKSakN2Tl0IMSIO3x0UZqCVNvVnG72+Xgyf7iW6on0bwsHA7KcEax26AZpht2Ki2MZB6elXdmMslMM52+zKIhsBpKub4Y7VFQFKWNSezvvSPoquLq8wnMbP+SZdc61l/7ICugyJKnAkWkffJdT/nLiZkcW5/nm0wkbtUMUDOPRkRvqA4aUsiL3Nu8GYwfrya8+jgCw0XEYPRKEohmH4geHvuufdA9ex/P7X16VcMj+9YqLMhjCJPHBFKm4103w4m3c0K4zUFIEhQXwPuWzMSVSKmFVuYhCbXN6yhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/23DzmzG4bsIEFCgECowFMOaiiDTrvK8b2IgKMg0WB8=; b=OX720TXfHidHjqXYghyUBCTXNiYeDV6/JQES7IGj7PIrrfrvZwHoq489590JJ7bZpb8iqe/2lfHzqZfTDdqwnycc5+JTPeBQC0vxyxOE5v0iBmoAheNli6r7/9Hdr+T9BZx0mm3SYXRXGNGVXvE92k6k2m87nnQuQWgZtDa4Q0WFyDmTGiBSxr8H40G/iED5WtgtW83jT0MnwKiWGrzVcSO1V4w47Y7hDT+4LggV/3C+3DWtK8c2+wZIlhKfRiX0/m56JHxqjGItm5ZO55R1sKR4bGsdKtajSQ8n0cXSm4XO4G6qyWV99nN8sULoDckK8/LxYkxsEBGMailbKci8EA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/23DzmzG4bsIEFCgECowFMOaiiDTrvK8b2IgKMg0WB8=; b=ZihEyOh0ZM+9fwpkqg7V8/rpJzXjtIkVC1ySGEPGkNdvckJM8rZsrm+OpSgBrSYOQ8N5QTxHUN+hrDdpOY8+BIulaGz6fLPNe4VRjeznjL3Ocz5lsXd25DV9Iwa4VxilC9M1M/51kMS5bhWxK2xdVB5ME9DxVfiiCE3ILj8V4aU= Received: from BN6PR1001MB2180.namprd10.prod.outlook.com (2603:10b6:405:32::23) by DS0PR10MB7901.namprd10.prod.outlook.com (2603:10b6:8:1a8::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Wed, 30 Oct 2024 22:51:23 +0000 Received: from BN6PR1001MB2180.namprd10.prod.outlook.com ([fe80::34e:408e:c7a1:2446]) by BN6PR1001MB2180.namprd10.prod.outlook.com ([fe80::34e:408e:c7a1:2446%4]) with mapi id 15.20.8026.020; Wed, 30 Oct 2024 22:51:22 +0000 From: Indu Bhagat To: binutils@sourceware.org Cc: Josh Poimboeuf Subject: [PATCH 1/3] ld: fix PR/32297 Date: Wed, 30 Oct 2024 15:51:06 -0700 Message-ID: <20241030225108.3377357-2-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241030225108.3377357-1-indu.bhagat@oracle.com> References: <20241030225108.3377357-1-indu.bhagat@oracle.com> X-ClientProxiedBy: MW4P223CA0020.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::25) To BN6PR1001MB2180.namprd10.prod.outlook.com (2603:10b6:405:32::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR1001MB2180:EE_|DS0PR10MB7901:EE_ X-MS-Office365-Filtering-Correlation-Id: b37228ae-2b84-443b-dfbc-08dcf9356069 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|10070799003|366016; X-Microsoft-Antispam-Message-Info: 4Y8ZxT0+oBigLfMjvOGkEVGiNfdH4Set5MzXn9qSjaltdbz/T9cx00XXrf3V+McIDqjvZS2QEZonkPSwVgaX2SuTFU25N7esFX17TGmuOm/M0RGI/01OWPNN41OX/xWFSc8ZIHM5v5VsFj+dZcAkJagd1GvZ1CvTVpbXwKNmWCe3hjH59WE3eMzACqgiLo01CBVlN5BovzxPOY4DAdPW6ozGkYDQ5zvFOc9XP0yC3EAi5muCLuFyibT+l1bzd3riesA+goQA4AezJxAX+3huOYPzNz34XMB9FoHOy5Swyka0TKSOs7+XoyqzljJ8KjxOsSxsUnnchQkv/xlhlW1/2a81eOmZCpik5XWxodQ3AHVHHtROHogm7rW/w14CdHGc4d+CJEquXwkj+RneML9YKK07abP+brqWEQLvFqAFsD81x8UAPYUuDkfBpgSAGYp1h1rj5o6WA7WOTQCfHsqBLO8vHB5e/I6C0WFPD7lOfzj6YenjUQ5IQY9BrdxUwsOabE3G/bwJr+JZIq9Zz58wKJnHMLObDgduaoraqRSh3wdpyT+TKHvYOVkHUd9CV4Ya5Nkp6ptkcGjskLC3fOf5ljJTVLSTekmtzX11jXOswDE2rkkOz4ORmWw/FCMcjUJzgbUY0PFxtdW1eSEvOg86kH+ObdD01zlnY1s+bljNjjUnh/9guAdr62zJGcFTNeOd78O8+xlUsdi6dx+2E6/+m7velLkXQX1a9yjtLQeeh38IEhSdtg5KRDLL6yGphyGzW+3a9UaBvrGt4BpEmt34X8NrEDkXyZUseKV3WtXnLH+iaOnbkl9jeQmzxm0TfrSpP0eaTCKxCtmOJIu6KKokxA1NA8Hmyq59Jk4rn0jx9EhIgqz5JrONhBM4aKgzMMYeUBbBS1z+y34sI3mmJSiaZEWNPspS9CQiYh+0SjPdgeI39EkykJ03+bn1HO46h6LckLOe0HeJZQUdDtj9mJhdLkQzVkkpycSsSjpBtfDmP4ILIdSJetay79up4Qd1rNoYumdZBHK7TYW8uqsWEPj+eh/g25jJNEtnxenr7U7PgIGiphZ4Tk8dVzyzMsL9WYgYqcOgl97KkklxzskLC69JYep3IvwkZojjkPBErta+6HIyl34l4kvhcAw47O0UEdiPGvxnCAXaaKZHdcLu4QyFc32BOtNVxEcAhnH0ttbgoGgNzTxKlyn4gtt2W1KDouxLuogsoNu8oGvowBXbPAdHfpmvBbtdVI+wFbGwgi0EG4FkCPvqi3VCf8PniqjfNBz6dXUNAUHZ34fxZ0bzH0kHEYn2yjH0Kb6NbMkqzkb386PEsda12PP5YUmFgdtsGXhW X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR1001MB2180.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(10070799003)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qfM+U2aGXErHPLFAe3EdpX/w5K2Vo3NMjZ5eu6pPAMqy8UkcWMyjoWx21DU1yzC+7S0M1ppJjXEO1S666907ooYvAokeiccFk6rU/lf+hCBZNx25TfYvwe0IJIAhgRSQ3JsdSym8hzWlTfLrT1jZ63baa/L8he2XH88JVSfppJKMkUA4LwU7LT8Vi0Ih0fhuhmMMPK9uyh+newFS1vrxuKDdknhk3ytgwWbVi35Bj+CVMJMglrCSGjskRZb/8s0+YcdiFmqtGVZFoViNDjjxY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iuoY/od7h5cRXLhsEjVhyVB0gQznqSsRK3LKEPymLusKHAdgXEhA1E6jbjy8wTAN0VmFKQozvWl5AWMZ3P50+8tqSV2g+AS62NB+fFvmv81OVcd56Jmwn6xRnmmsPLFUKJeFMYXTVZ0Q3SECZ8l2RK8/bUGBHiOwvapqu9AEVO1bxzg/5zuHkqvs4xNa02He+0eoqrMZjbKxND4Y+Cv1ItSjM63439WZSL37mqmxe0uAe4Tqf1Z0Fj7mra7UWNa/ksZMRnAKiNaubqB3Gg8= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: bXGkWmjGL4CdBwPr5vFzDSoowbZsY+lkfBVnZflRGfEDKFsd2s9mTyAj9vAE8amAbiNXzQ4Ln9DSAahoVAUcvZq9CJNNfxSQwhhI3wZcpujSgELjkZ//jPyqioqZejkTWFI+B+d8etsSCByM3ajmfXXWNsQdflwh+YQh4SjcBkWiUievapxInhXSRsFnWvTViLxQCAPnDpNA2TY4kUEhCp1jYbN4cjfc4AGfQtqYJRjK/KR8r4jiuZJE8JyJzjSifA5X0RErECbWmPpW1/rVY849PlgUolS0hUepOR62FYT6AMFNZCZgouxqf+Zbj0ht61oMFpCR5jZX6gpnfFRncpy2E7wCkMnt5iu9+NeErbgOExpppMdQywK7M/3cJTME2wJQ66bE+rRcZQierDOfUiys9McICWP17E4k/qVQwV9D6UoaJZmioy4isgBD7XoUfVT9Yzv5i+5B4yTIXKR+IhH/OGJpDrEYgJez+neeTs5PHYdIzZtQlzCeAD1XbTbUZW1rXRojrZwCenPIZsRNT7FlvhxiouLzlziAWuVU7N+U0X/ZiByvUfgkG8k0sv+D1KY9nCSURyf5bihuBSF6ai6dv2DJ7iK+9A2Mc5lVKK4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b37228ae-2b84-443b-dfbc-08dcf9356069 X-MS-Exchange-CrossTenant-AuthSource: BN6PR1001MB2180.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 22:51:22.9304 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EHWXtWcQFhKNP7UbJU6Se6zzRDCC55CtrrYk6kgCKQL/DfWlzpQZOHQykkCNCO9/TLZYVfaJsi5wm265OKDuLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB7901 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-30_14,2024-10-30_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 spamscore=0 bulkscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2410300177 X-Proofpoint-GUID: FWOfepvvQPmLquActUD_wYA8ZTd8K9Wx X-Proofpoint-ORIG-GUID: FWOfepvvQPmLquActUD_wYA8ZTd8K9Wx X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org From: Josh Poimboeuf When _creating_ SFrame information for the linker created .plt.sec, the code correctly checks for presence of .plt.sec. When _writing_ the SFrame section for the corresponding .plt.sec, however, the conditionals were wrongly checking for splt. This was causing an assertion at link time. This issue has been known to affect glibc build with SFrame enabled. No testcase is added just yet. A later commit ensures correct SFrame stack trace information is created for .plt.got. A test case (where only .plt and .plt.got are created) is added then. PR/32297 sframe: bfd assertion with empty main on IBT enabled system ChangeLog: PR/32297 * bfd/elfxx-x86.c (_bfd_x86_elf_late_size_sections): Check for plt_second member not for splt. --- bfd/elfxx-x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index dd951b91f50..0d83ce57d4f 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -2680,8 +2680,8 @@ _bfd_x86_elf_late_size_sections (bfd *output_bfd, _bfd_x86_elf_write_sframe_plt (output_bfd, info, SFRAME_PLT); if (htab->plt_second_sframe != NULL - && htab->elf.splt != NULL - && htab->elf.splt->size != 0 + && htab->plt_second != NULL + && htab->plt_second->size != 0 && htab->plt_second_sframe->contents == NULL) _bfd_x86_elf_write_sframe_plt (output_bfd, info, SFRAME_PLT_SEC); }