Message ID | 20231114175805.7783-1-david.faust@oracle.com |
---|---|
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a59:b0:164:83eb:24d7 with SMTP id 25csp2098032rwb; Tue, 14 Nov 2023 09:58:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgDjMD+F2tX0PKDhYhLHoXX6/LAmz3FeC7BXpb/MN8mPqDAwjPTpqtcRxVzn6qzfxUM8cW X-Received: by 2002:ad4:45a9:0:b0:66c:edf4:b955 with SMTP id y9-20020ad445a9000000b0066cedf4b955mr4293221qvu.21.1699984707052; Tue, 14 Nov 2023 09:58:27 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1699984707; cv=pass; d=google.com; s=arc-20160816; b=IyHYLSg9gK1TOY3dZyEjIbam/tTJ8LzsfqzEwzsGP4TYwh2uf8acf+Cf2mkDdsgnWq yVnvaik+qNYG3q3QDR95/KJv873DfrHLKxL4hGM6lEGuuzH/weV5dSpb2ybFwmdvY3ez 70CB14ILJnUslq9xPEzEy+Q/rp7Gtd8TuGzbR07Dlas+E/feAVtiBpwrDCWataweqPMO ysLSSyl3o+J1Mej+S5c3jOeKwQaCRpbYtBzoF7hI7oCLyjlMSaCkA1AM81HajllqyeC3 aYBepSRnX38tzg1nsqsFZCMaOSnLsfFWOQ12fIG2nPaeg8It8I2V1ouvyg7iWla51yMv 5mHw== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=5mN05MmYDAxZhkxKEbe0hIEcAqqWq+oHaO6O6Dh0BLE=; fh=wSzP53OROu/pnOPlCkp3HnrTk8rxBK3kJn/ZCkUt/l8=; b=bZ8vJljGAPFW4l9cFrZ2/p1w6AWkeK9uKSITBnQzVd3KFeuzizOZCU2OsPTtdct9wq wHAe4SwQVbrUBwDIMamKL2w0RBZpx/9hzMUIgNgcVcQ2oLcp0v+y0ET48nXCvpqDRcUb 4zFD9kmDecUdzuR6ECJOfC2PZk71pxDph3pc1WXEThztZTMYDzQ6Z2uKwhDsEZnhMg7f I/sAheBX/eE8bBR/eYmOVXfyX6lcg0MFQhANef4R4eXsYT61dwZVv5DB0+DGsRDkoPVl c2a6BTYnVMybrj/3HDyarXTpHEU2yvGTWq1xWDRaAK0Ud8Cb26rcLd1ZnrMmbmfry9DM Dmsw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=VTpLPk1m; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="pr/nJQ2f"; arc=pass (i=2); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id l10-20020ad44bca000000b0065afec1e283si7176300qvw.344.2023.11.14.09.58.26 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 09:58:27 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=VTpLPk1m; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="pr/nJQ2f"; arc=pass (i=2); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C66683858403 for <ouuuleilei@gmail.com>; Tue, 14 Nov 2023 17:58:26 +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 C2D243858D20 for <binutils@sourceware.org>; Tue, 14 Nov 2023 17:58:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2D243858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none 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 C2D243858D20 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=1699984702; cv=pass; b=SlW0ZiENb4VuL4h8ozzzgkZ8o0I5O8aVoZRHdI6kk8ZsYanMZgmGgtwdt6Eu9gNBlmo/aq0f23xr1kpDDDqRsFg002r1GswwzxbehZ7xjWduFRy5OUJD9v9jZELpzfNnvjeGG+bsPPMxdvC8EbLX5SfxSdVY26+suWZTfseWFK0= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1699984702; c=relaxed/simple; bh=owvaMYUgkNEZhmrBoKzWUaTiW0awlyKitIBW9bj+wKg=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=p584YVzbPIUs0+j2S5ltJV8DHu8XBRnhBCUz30FyGGdBsfdrvCqZkn0mYeqvcBwPKI3hqPJOw6FJhX5eqkVeU7B4PNLnOGp68qgt7CoidPsLV/3wZTyiUemnBetHgwqx/MofH34NI5O/id8+sgqH2tGJ21cZ2Sk03TrhpcMQbr4= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AEGi0Jh007436 for <binutils@sourceware.org>; Tue, 14 Nov 2023 17:58:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=5mN05MmYDAxZhkxKEbe0hIEcAqqWq+oHaO6O6Dh0BLE=; b=VTpLPk1mDmXM4ReDvxSeMOBQF6yIStKd340mGmuzQKNgLFHHlCtp0zvtAcj+gjkvSPt2 u9qg18dsLksDBRTkgFQweF/jj0laNiD2vHlFysYBysRMYfAIqqxS6QVx0kBhPDhhazcD VBapGaobWaZYPirCaHfuMxiLXGRWlZFL0VQ+39blzQ2GYiDT8wzBiZt2SBMB05TUMiYe A833yHB3EEEp0maqV7HWU3sJRlzVJFno7/cPy1OP5ecJivfWZog2Y2iGuW7SbCcbcigx T6Xvksg1kCUCVnmyM5pq7OkWKGlDDgNM7osOn+H6VB/8ojpTA+NfB1GPB5iCHnlBqcgP Eg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ua2mdpd9u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Tue, 14 Nov 2023 17:58:18 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3AEHIoCT038961 for <binutils@sourceware.org>; Tue, 14 Nov 2023 17:58:17 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3ub5k3q81s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Tue, 14 Nov 2023 17:58:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cDjpGO/EzHudkjZLJt4BZLbUumDTB9/5f3LM/Wzd2ZCiam8Vu0jdVcSfHTGMJBzruO2sspafEI09ZiLaZWn56BeRddLwFZ3E3PbTqh34QRgMGwRe5MFoqzu9z5PbWa5z4KHIKZ5msnY6Vg7ID2GwEFqqKmRjFtOJSA1+9jR/CYBlN3koA4MSgY2/mkr4sLlgyvGFeS06Dh1eOQ87jSssMXxPEPOZkUaC6rgo6Bx0FjObNwFx202TlIxt8zJQCYqrMUSswVc1aYuXBhka7SBwEuWUnFIqg5KysJqT+BTfCvbfKkw9pNlaGRDO/BoCOU5Dvqt+ra1gtGDirVQqDFe0ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=5mN05MmYDAxZhkxKEbe0hIEcAqqWq+oHaO6O6Dh0BLE=; b=DHZerWrCCZuAI+asMoDfSZRce+MIPEQnX9t0n4rFlvljIlIM6sMbsDoNcam4tIBnYkA3FBIE/yEG6Hn2ctb2VJFvBAT/eRxaVHSSRrWwY+VisSsCephB3Bt2lFXHgvXpkRIeYyR8i4PRl4cQlF9zdEGw7hqC3VOgxrPpPbRrCMkdUeWC4X/50OqwlTyQOMxZT48iIehDLWJaMsKUviR2W4qtQlypR0Nae6fFx+WRGd+5/BB3IPqStrHzlpNyDr6IvDD5Py4uiXmPBlTVtS/LmAL0yk8hGdGTzzEkuKDpFEx3Upcoayp/VuQpQUSa/Tt9L0rwLOMa3Z7KxYBqViemxA== 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=5mN05MmYDAxZhkxKEbe0hIEcAqqWq+oHaO6O6Dh0BLE=; b=pr/nJQ2fH8uzb79oGpnrxeqQ/6PDc72NcPC+BEKkt8gYmrzukSGTjiCVqfdR4RIt0FWbKxoQxrrXR6dEiYVtbhec1cOxSAgiy8MNmBsVqA3YhT1fKU0m5Z0J1lIgZWTkGLJ6rts96uH/EzG8k4sc/ye3+XkTKyvByMhvPP6+bws= Received: from MN2PR10MB3213.namprd10.prod.outlook.com (2603:10b6:208:131::33) by SN4PR10MB5573.namprd10.prod.outlook.com (2603:10b6:806:204::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.31; Tue, 14 Nov 2023 17:58:15 +0000 Received: from MN2PR10MB3213.namprd10.prod.outlook.com ([fe80::d8:db85:8025:ed64]) by MN2PR10MB3213.namprd10.prod.outlook.com ([fe80::d8:db85:8025:ed64%7]) with mapi id 15.20.6977.029; Tue, 14 Nov 2023 17:58:15 +0000 From: David Faust <david.faust@oracle.com> To: binutils@sourceware.org Cc: jose.marchesi@oracle.com Subject: [PATCH 0/2] gas,bpf: cleanup bad symbols created while parsing Date: Tue, 14 Nov 2023 09:58:03 -0800 Message-ID: <20231114175805.7783-1-david.faust@oracle.com> X-Mailer: git-send-email 2.41.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: DM5PR07CA0058.namprd07.prod.outlook.com (2603:10b6:4:ad::23) To MN2PR10MB3213.namprd10.prod.outlook.com (2603:10b6:208:131::33) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB3213:EE_|SN4PR10MB5573:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c76b8aa-707d-48dc-339e-08dbe53b468c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NNOPvWLISK4MSQGKW75UVBDIjZHPbfwiwvDTKwcoQwTMYPxf0bviY7chnqLKGY4XX2ZE1a21aZKBQDZZAoHHyO2PciYGLnv9yOdxYAedd+wa1paOT0hSf/mWlhXTXQriZ49E4jVlBBMcXD8gMqr7TLL4DzA+tstm7JWxdhE7flZTbA7IbOXQfYbIPcBEqExptuOqO9MWTDRDW/tnV5irlERJGyHBDa59//kbzom0KfBW5TjhOp8JlUs2E9w6z/rcVMDkUeHfSDo9dt8hbBB6MArQGQNrRpJcUtnIkP+zsGIppLDioNuUH8zEDulKfCxzNChiVBD0+aGfDQEhSvBDy7xJ0ryLwt4s7f2K4wjCiINdrILmUEX9/k1vwcqCeUoGXccwLUUxH2IdWYj5P8TNOnTdld7pI3mDnmRtxeohYbnJMit5Yt10V0Ivnujyf4ljMg3yFza1XPJtM0Xcn2gUxDHruIhxv59uI2+7rrxQkNwu8y/YeOOurSyhsiVdh+CBjWMGRYd54OFlBR0Ma18ElhBq0DpuPDpvaGcALjtyb9lGHx7AHS7WQ32/aR5OZHX9 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR10MB3213.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(346002)(376002)(366004)(396003)(136003)(230922051799003)(451199024)(186009)(1800799009)(64100799003)(26005)(6512007)(1076003)(2616005)(107886003)(6486002)(478600001)(44832011)(4326008)(66556008)(8936002)(8676002)(36756003)(86362001)(5660300002)(2906002)(41300700001)(66476007)(316002)(66946007)(6916009)(6506007)(6666004)(38100700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: k9DQIyKoiNeOveQQ6g8Ka0wQ5QCCpVB8Y27+WbiP6WjSMRvQeEmTiU9jFCtSw1obUtgQO5FHcnk6EJie91sJMZHgT6rk6c2NITFuo5BWLQS/Iwgjkd4jYR1Suli+DLE20js7memZvKGjwssmI259etlS66ywyD9WPxajg62o21mGzsgX+uqmKOOcerUzGnV2S1VhmKsC4hSxC4PZZ9u/mkRS+DWpQIwpiurPb9wmNzIGHsC4r9kwhZ99I3Zvb+u+frZly5xGHipVKgogpLP/p2Xz/vpidYs0hAplrRZZs1aoYbenc6IqF0U1nDvws3SGUYJpFUlJfKHCmeiC3+1FLuoEIiOV/3mOvlKfOg18knQj9ZKSuyKFkXv5aONcVe9GvJeVj8FxXrUSyKqvYac4c/Lak86ho3vjPde6KWx9zXuUmuiHVsKGFei0MpOdtf5j01/1ezDf+gnM+Av6FUjBOlG6sDzmkz6IpF9QYeOsMpQWaQcJpdLhfw8qmw3hk9f998mzgIrAxqm3UrhaVyFVBOmgVtcHlsar5U63Iz06l4kYr/jNs/1oAnb5XJgJFPeCfY+KRP1W0+dIQkTdJVBbNwp60f5VDkNY5fMN5eIy2Y6aoevbpgH+0G4Dv62tvQIgS5klXUimgNh7q179Hkm6xACdSZ4MryRpj1ckLMIhY9gcNmUzOLKYrrrgP2X7CiLQXXbLWNkazqy2REDBt4SXa3YIokAJkhZCyOUfQ3KDX5pwSER2/xOjGX1xSAncSPOT0qx+WecsqtaMObxuAvYHV3j5sgd9V7RAyp+iQRbRNv0QBI31a4e6+mKibVpp9mXkK6QsgZxXvUwCU8x+1WGcW5NPI8RFjXgyG4pnVI+uDwVlhdBcGEW43h0lkxM19eFJg3vBXddmOVO+iMsspqySX5J25kzB/qGLlnQF27lVF7y1oumsmkwOnhzybeL1UWtnaNxySaYLo5pIQHBtYQEqB4I5bbMbiHTcIMTCjnI3p4ymHRO5AycPd4/ETIN+UjWcO0WMavkNNSbwLDUBU0EHuQQSEzvXU+7c+L2yM6A+qiqJpCxYopXtgcHL88eS9mb4FVb28dLsiCd8hzvRH305yM5rbBgRXO7OyK7qncq4SDdlF2bn5bJfNQrW0ZcqYkPS57+UFxkSqL99WRAu6wRj4o8XttPgwelIC9kc4u5DyT1/obpPVtEdtjfV20mfAB6xCxVL8528HYMT5iC9k8LeXJhCvq0zoJcnhwBaJoEUyuIAJx+vtM3pxnowwvSRl17fz6xTNVzBBioopFIN+zF32+spqYN/VzQ53nKsum4nxgfjtKG4YhF03plWBJbQXw+KXviNSC34WmHuvD5c7n94QejpOmlZjoxTNu5xk6G4bSk6xCxwcAB70MXlGUOfbjEZGFkDI6Ok+a1nzvoagD6fZFsitPKbO1Y0F9kEl9ZB+boauoG4grSrl+oBKC2qjWhzT9cR2g7oDUHPeeeP6/hvPCFQhITMNmLTA5tJMdutwva1u9TDKNzFzPf+zqCkkwkt4YC+yeCiyPrqPa6JMO+5Oc5p0zfYv7JoS5+ANgV7NptEpZp/h0huAd7lhC+xd43oFcDzvQ4TrfC6F4ckIRbSbw== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: L0C1VO1CeKpLm46GH3xcSWM56SaeA9iZwz/9oatba/3rlfkLxqteyqEPIRVfN3TaKnLsS4rqErzi+jAnf2PPQKrxJaGUAQdYGTB8DRJSsxel1xuwBQ5gu2hPMclMy9QjL0sdeUldlelelT/EicalljIqdxjfjN/v2tKhsQpUrc7LgbBzwUTRnhBI5ZgfWvg5/DZeT4WukE1zoEtAjGlV7et63kOh8ue3dJ7UI6HVxQcIu0tlVynW9E62t27sMTjczljl2keyuEBPLU227XvmVHoQlsRWU28yoUkpRXtvDHe3bmwVcy7ot7pTD+UaVn8Yi9i+FHxNE9IAnIVIBZib22G/6rMwTKtaGSrkwwEnuehCQKQOwzsw7mc9xQKISUm7U8TkPbNIgTN3Q4xUUFHLaXuje9cTTuH+JfLV2ZFnR9ZSH4a+aC7Wc5LJ7npCMsw4gLP2DOr0YKnZCE7yj+S2BHTS7c6Ed9FnOaJBTu0nxxodF2xglzdfwc3mY2ewxQb3pgd7t8Kd5HUejIEGSQ/19zKNJakXruv2ltLwi5+7V4iOqRkCvEFFsg8prOZNoGDHz0ZoMjevHwHlZ1f+tJHPf8AotXTVcGdz4LzC3wDzEhK20q9juTX6K+gQ3Zqm5Py1118p2edw8yzdBLgP8sJoKYrd31nhlYyyYQODIjbsh0Uh5lhpFEJgeDYZ1/JzKMxalQa/QR9FkWfCs/0wHsp5bQ2N8GwQ5sY//HNkS3EkDZzDHPL6UiOm0OlWMEugdF6QeY06DD7gVg2f4rS5JyWXVQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c76b8aa-707d-48dc-339e-08dbe53b468c X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB3213.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2023 17:58:15.3801 (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: xykO+QmCbjoN9oWd6FkBlB2mtAopSRsOgbBwIzl3tqZdHomzbioWFNa8QGlqWz91Ryh5/oBELo4OqTHA07gIKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR10MB5573 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-14_18,2023-11-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxlogscore=615 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311140136 X-Proofpoint-GUID: tR3Iit754KqIaOK5BbB4MPUCwyaP1oLO X-Proofpoint-ORIG-GUID: tR3Iit754KqIaOK5BbB4MPUCwyaP1oLO X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782563163802845774 X-GMAIL-MSGID: 1782563163802845774 |
Series |
gas,bpf: cleanup bad symbols created while parsing
|
|
Message
David Faust
Nov. 14, 2023, 5:58 p.m. UTC
To support the "pseudo-C" asm dialect in BPF, the BPF parser must often attempt multiple different templates for a single instruction. In some cases, this can lead to a call to expression () which creates a symbol, and only later the template is determined not to match and the expression is discarded. However, symbols created during this process are added to the symbol table and are not removed if the expression is discarded. This is a problem for BPF: generally the assembled object will be loaded directly by the Linux kernel, without being linked. The kernel BPF loader requires that BTF information is available for every symbol in a loaded BPF program, which will not be available for these symbols erroneously created by the parser. Patch 1 adds a symbol_table_remove () function to symbols.c and exposes it in the header, since symbol_remove () is not sufficient to prevent such symbols being written in the symbol table of the resulting ELF object. Patch 2 detects cases in the BPF parser where a call to expression () created any new symbol(s), but the parsing of the instruction as a whole against the current template failed. In that case the created symbols are deleted. David Faust (2): gas: add symbol_table_remove bpf: remove symbols created during failed parse gas/config/tc-bpf.c | 30 +++++++++++++++++++++++++ gas/symbols.c | 10 +++++++++ gas/symbols.h | 1 + gas/testsuite/gas/bpf/asm-extra-sym-1.d | 7 ++++++ gas/testsuite/gas/bpf/asm-extra-sym-1.s | 1 + gas/testsuite/gas/bpf/asm-extra-sym-2.d | 7 ++++++ gas/testsuite/gas/bpf/asm-extra-sym-2.s | 8 +++++++ gas/testsuite/gas/bpf/bpf.exp | 4 ++++ 8 files changed, 68 insertions(+) create mode 100644 gas/testsuite/gas/bpf/asm-extra-sym-1.d create mode 100644 gas/testsuite/gas/bpf/asm-extra-sym-1.s create mode 100644 gas/testsuite/gas/bpf/asm-extra-sym-2.d create mode 100644 gas/testsuite/gas/bpf/asm-extra-sym-2.s
Comments
On 11/14/23 09:58, David Faust wrote: ... > > Patch 1 adds a symbol_table_remove () function to symbols.c and > exposes it in the header, since symbol_remove () is not sufficient to > prevent such symbols being written in the symbol table of the resulting > ELF object. Hm, I misspoke here and inverted the reasoning. To correct myself: symbol_remove () is sufficient to prevent the symbol from being emitted. But it does not remove the symbol from the hash table used by the symbol_find () family of routines. That means later calls to e.g. symbol_find_or_make () will return a reference to the old (removed) symbol. The symbol will not be re-added to the symbol list, so it will not be emitted, even in cases where it is real and needed. Adding and using symbol_table_remove () allows a removed symbol to be potentially re-added later.
On 14.11.2023 18:58, David Faust wrote: > To support the "pseudo-C" asm dialect in BPF, the BPF parser must > often attempt multiple different templates for a single instruction. > In some cases, this can lead to a call to expression () which creates a > symbol, and only later the template is determined not to match and the > expression is discarded. > > However, symbols created during this process are added to the symbol > table and are not removed if the expression is discarded. > > This is a problem for BPF: generally the assembled object will be > loaded directly by the Linux kernel, without being linked. The kernel > BPF loader requires that BTF information is available for every symbol > in a loaded BPF program, which will not be available for these symbols > erroneously created by the parser. > > Patch 1 adds a symbol_table_remove () function to symbols.c and > exposes it in the header, since symbol_remove () is not sufficient to > prevent such symbols being written in the symbol table of the resulting > ELF object. > > Patch 2 detects cases in the BPF parser where a call to expression () > created any new symbol(s), but the parsing of the instruction as a > whole against the current template failed. In that case the created > symbols are deleted. While this may be a workaround (and perhaps even a viable one), I think it would be better to suppress symbol table insertion in the first place. I had to solve a somewhat related issue for RISC-V (and I expect MIPS would want to also be switched to a similar approach), see 7a29ee290307 ("RISC-V: adjust logic to avoid register name symbols"). I've looked at the testcases added by patch 2. While the first one's purpose is clear (thanks to the comment there), I can't really figure what the 2nd aims to test. Which may mean that I'm not properly understanding what (set of) condition(s) is/are involved here, and hence whether using one or more of the existing target hooks can indeed help here (without needing to transiently insert any symbols, and then having target-specific code depend on how exactly symbols are inserted). Jan
On 11/15/23 01:49, Jan Beulich wrote: > On 14.11.2023 18:58, David Faust wrote: >> To support the "pseudo-C" asm dialect in BPF, the BPF parser must >> often attempt multiple different templates for a single instruction. >> In some cases, this can lead to a call to expression () which creates a >> symbol, and only later the template is determined not to match and the >> expression is discarded. >> >> However, symbols created during this process are added to the symbol >> table and are not removed if the expression is discarded. >> >> This is a problem for BPF: generally the assembled object will be >> loaded directly by the Linux kernel, without being linked. The kernel >> BPF loader requires that BTF information is available for every symbol >> in a loaded BPF program, which will not be available for these symbols >> erroneously created by the parser. >> >> Patch 1 adds a symbol_table_remove () function to symbols.c and >> exposes it in the header, since symbol_remove () is not sufficient to >> prevent such symbols being written in the symbol table of the resulting >> ELF object. >> >> Patch 2 detects cases in the BPF parser where a call to expression () >> created any new symbol(s), but the parsing of the instruction as a >> whole against the current template failed. In that case the created >> symbols are deleted. > > While this may be a workaround (and perhaps even a viable one), I think > it would be better to suppress symbol table insertion in the first place. > I had to solve a somewhat related issue for RISC-V (and I expect MIPS > would want to also be switched to a similar approach), see 7a29ee290307 > ("RISC-V: adjust logic to avoid register name symbols"). I've looked at > the testcases added by patch 2. While the first one's purpose is clear > (thanks to the comment there), I can't really figure what the 2nd aims to > test. Which may mean that I'm not properly understanding what (set of) > condition(s) is/are involved here, and hence whether using one or more of > the existing target hooks can indeed help here (without needing to > transiently insert any symbols, and then having target-specific code > depend on how exactly symbols are inserted). Hi Jan, Thank you for the review. This is very helpful. I agree that it is be better to suppress symbol table insertion. To be honest, I did not think of a good way to do it before this workaround. So, thank you very much for the pointer to 7a29ee290307 because that is certainly a nicer approach :). I think something similar to that will work for BPF too, and I plan to rewrite the patch to use that approach. As for the 2nd test, before adding and using symbol_table_remove () it would fail because the symbol 'foo' was not emitted in the object. This happened because a failed instruction parse would now remove any symbol created while parsing the instruction, including the real and used 'foo'. The symbol was never "un-removed", because it remained in the symbol hash table. So all later calls to find_symbol ('foo') returned a reference to the removed symbol, rather than failing and allowing 'foo' to be remade by a later instruction parse. With an approach that suppresses insertion of wrong symbols rather than trying to remove them later, this will not be an issue. (The existing gas/bpf/indcall-1-pseudoc test was also failing for the same reason.) Thanks David