Message ID | 20230207024424.4000862-1-yunqiang.su@cipunited.com |
---|---|
State | Accepted |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2605220wrn; Mon, 6 Feb 2023 18:44:54 -0800 (PST) X-Google-Smtp-Source: AK7set+44KMdnfB35uk9IMgRIQGHroc8fAgtK+6jUzSb+nFQSleceZvid1s/XcwXFN1DnYgg3r0O X-Received: by 2002:a17:906:25cb:b0:89c:d072:e33e with SMTP id n11-20020a17090625cb00b0089cd072e33emr1556742ejb.49.1675737893928; Mon, 06 Feb 2023 18:44:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675737893; cv=pass; d=google.com; s=arc-20160816; b=BjvELzVb4QocUTFPcqESmvCHZDYD4f/wxBl5M9StCOpCynNb3RJ+sXd9n9ojlLpFEX CFltYMpMpu4sxpnYLj79xvXYZoe4KtFDeNP+LJx+e/PUj4tNa9sGvtKCzqWISvcjisUx 08vehObe747tkx8TXpiTHsJ8hPF1FEOeV+PhrX3N+yNHrmNsTr05aTZM4cEtUhiTMJET r2/+GvvDKJT1iO7OtdDxgvcEWPvQvnLvzYwzoRCDRyKKGAYbb93PaOaxgHzaoa1k4Sy/ 4IOayUdlK/lnzH3VG4wZU4Otfal0ddQ9b9097lkltJCZrNCxTGUCpfzL5ZWQd6qxL2o7 nasw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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:dmarc-filter:delivered-to; bh=bC2A/haV3iWuTiw6qYHYFV3XibQkd8Jfq729qJVaQVQ=; b=F+xGQTQ8ii4BbQ0op7JOAf995p+NEtQb9qZ4WRoXCUnP0fixgV91s8V3M/7z1gHpk1 hCyv8IyB4gzZIz8fuzDQIVLNBINTh0cMEEuctER0lQ4+UDCF6SFl094eo9tqhBmq8i4j B4+wjgBg0ZGkKsOtPOfW/8cNCRfN1XV/1upo40yC+oyuivfg6e1pUM4TEZdYNXVL0wO7 N0vrULOKhbb4vBkfk7nNTkQjOcaChLrQbRxgXOivZnFJRBJatj1/D7VkitQ3VnW+Oj+C XpkO7dqOvF9qFVLmxUJh1pv0ke3eDI2xrNs3Q7siMmRhWIzvlwPLmtXeZBKChcA7NTQf M67A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=XNcO4z9K; arc=pass (i=1 spf=pass spfdomain=cipunited.com dkim=pass dkdomain=cipunited.com dmarc=pass fromdomain=cipunited.com); 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" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id j17-20020a05640211d100b004a24e51305esi19337596edw.111.2023.02.06.18.44.53 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 18:44:53 -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=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=XNcO4z9K; arc=pass (i=1 spf=pass spfdomain=cipunited.com dkim=pass dkdomain=cipunited.com dmarc=pass fromdomain=cipunited.com); 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 435CA3858C20 for <ouuuleilei@gmail.com>; Tue, 7 Feb 2023 02:44:52 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2119.outbound.protection.outlook.com [40.107.215.119]) by sourceware.org (Postfix) with ESMTPS id 2747D3858D1E for <binutils@sourceware.org>; Tue, 7 Feb 2023 02:44:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2747D3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cipunited.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cipunited.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qzd4Nsl2I2mcpBJpvj3v7OYTIvGUZ7p/7GmbQqdWi+qjs/monmtZg9quoZEOcmUI5+L0xOO6RFXgwPIxk5XvN5OFPcc+V3WHD/qfZDNdz1zkCHqwMk/YxYu0c+5HfkRjjZfniKNmHUNYSjVR3fC/yGlOibr2PD/BEdvYFh1M70a/aGZvcqCIhCYA+uoXqsqI0U0OwFsJRtDSmkrHjfORA7X8R3gMESTgDo0mIdf5lPwBi7o3N243rU11Mufypm1lvEHp0wdLXvyZVscO+0lMck7FKk1+bAAkP8Ir7Dw/B3n4o5EkGWsefKDUZXjP5zATN5h3GpGXGIOlmlqXRQsuzQ== 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=bC2A/haV3iWuTiw6qYHYFV3XibQkd8Jfq729qJVaQVQ=; b=bw9VhYzeoQuLYddO+8WIMIE+ZiNpKDdS1rbB8PbKOh4ExLQPpgPn5b6xjRt2xL00wInqlppk84Iwwe43KxHkd8HzuTWIlG4ZuD9VCrHDkKt6WZkpB2i19VYKuoVpDKpQaFxhASjuWsSWx7EeFLkuegggQU9GWytzAI1NC4sz3vlsVCH7mD4Q2dzbmvLHbBb44WDSynFODD35+WQOzgFBhlWpMmzfvUrvxDtsP0Vu+BRbUU41uBeEuHSrHq+P1KVG4gpJGiCz+NWk82gMNENkzsZBTwYhnfyan6TT3hI9xL4s9sp11webjAzTM1NpeUAJKTGWJcRA6fQZPZhM3BDtQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cipunited.com; dmarc=pass action=none header.from=cipunited.com; dkim=pass header.d=cipunited.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cipunited.onmicrosoft.com; s=selector1-cipunited-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bC2A/haV3iWuTiw6qYHYFV3XibQkd8Jfq729qJVaQVQ=; b=XNcO4z9Kh/7ir1OMyjYULFoS1KtJBqBj27Rjxp3AKw3NcMiCqAYTvXjFGtp5w4WTZCRkPyCHwmuZnNbDb8/xdsALJ4U3pyJShkWhvQ4Bs0zzG1PULrCGb+mhHaGiyKsk92RLU2cirUM4w4ml+ddGZzHP2StxWGbjB2+8/UD81TY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cipunited.com; Received: from TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) by TYZPR04MB6521.apcprd04.prod.outlook.com (2603:1096:400:282::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Tue, 7 Feb 2023 02:44:41 +0000 Received: from TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::b2cb:a598:3a7e:367a]) by TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::b2cb:a598:3a7e:367a%2]) with mapi id 15.20.6064.036; Tue, 7 Feb 2023 02:44:41 +0000 From: YunQiang Su <yunqiang.su@cipunited.com> To: binutils@sourceware.org Cc: syq@debian.org, macro@orcam.me.uk, xry111@xry111.site, richard.sandiford@arm.com, jiaxun.yang@flygoat.com, YunQiang Su <yunqiang.su@cipunited.com> Subject: [PATCH] MIPS: allow link o32 objects with mach mips64r6 and mips32r6 Date: Tue, 7 Feb 2023 10:44:24 +0800 Message-Id: <20230207024424.4000862-1-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.30.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYAPR04CA0024.apcprd04.prod.outlook.com (2603:1096:404:15::36) To TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR04MB6117:EE_|TYZPR04MB6521:EE_ X-MS-Office365-Filtering-Correlation-Id: af794e57-d99e-4144-869d-08db08b54336 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YEG0I4mFAa0n85EVY+jNIacw0JJf0h8yWnXwjt6ShIe6+31W7rETcBzyisSZ/eQJsemgtMS6+eSam4OW3X0YinKj/c9TH3Z+CqlfnjpWI0M+4csf5NNM6pLyUnxZuObmQoMY5XkS+PHWun6k2eHz41u+K3Gl2XFN8wefqbNU29Dz8hpqsFXtPugtp7lfVRPMBgfY0VmzwVvXMNKIJBmZla6x7mQ6GYcvU/QaK1aAX7x4Y0NEm9dNp9xNFN2ncNGixbEEZPmBeIhBJCSZVzK8ZnhuHjL2Lp2dX/kR3ru2z1mFfpNybRyP9jjUVJlEQ/Rx+HsHvaoUN4V5vki75uLJ0HvQL/xx++vZ/0hm+e0dzL88AdtU5dRlK+r8F5xcZ44x1L9hAovtbRCjzuEeCTOYagGDMqA+Vk1LzwDePmsxxy6DzL66e2IMb0AZByMMjy/tykX5eBms2CFiJKNNG/imHqN+6fnqpk/skgrDKlHDnod6MZknTN52FbjQxlpsDvBXkAml1hG8CmNfrQn+S2Bgd7PPcILlR7Thy05kde/4KSJCysyG8+7TQO1N8bm5x1DT5uOoOV5/zbjJCqkpBf7D9nhVP4/TIFZ8M9yYK+sUsCfZ68V3cOP/vd1Nh0L1nbVLj8FHP5gQSmsZfAYF9s0W3z24jjsDafcqRgPhtPqs09HtJNvPfFmKYaijBVU07fspIsxGTogVHa84+jYhISrnCvFBejMxCsOMh8DVGjgDxRc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR04MB6117.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(376002)(366004)(396003)(136003)(346002)(39830400003)(451199018)(52116002)(6486002)(478600001)(316002)(2906002)(38350700002)(38100700002)(86362001)(36756003)(2616005)(66476007)(66556008)(83380400001)(6916009)(4326008)(8676002)(4744005)(107886003)(8936002)(41300700001)(5660300002)(6506007)(66946007)(26005)(1076003)(186003)(6666004)(6512007)(138113003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9z1ze6AP5lXoknZaAIQ+ccoIVhmR0D5YK0xe2YBW2wSajhvOUfh2+Z3LDp5b23KtKjp+s+55u7GPw329LIMAk5NbPcyXPN8PfkyaHKeKj8nqjUqDb8HkTDBxhqV9AmAiJ+gp+zqdoT0yTdg3X3eLaFiGBK5Nfb2YQIoY7Mkc6RA3IuhVpk+tHm2LOUYjBz0rirtiEjEu+SZ+jsaynbyCkwvPwWFdTYL9Yu39jrZk8m5rrbIEocCeAy+wmX0csfGr+rxnjy5phXJC4V5c+tNSm3a02m3A04IJLpW41IohUKrVkNmFbhcPFON4u63ui0rIyjMkyN8adyTGvziIzqzs7sqTkgQ5ZSiAkT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2KKSQ/FjnUZ6Zfw1d1z2v8bsrLQ+yVLE8aGRF3vD3t3thXqJ5ZBoznQrvKZjvH5DyIKV0nbD3v3a+uLIkxevYCHWRi3OR3nA0QvrCe1YmatSVZtBYrdvH5Cku+jy0KmHhnC+Hv4EP6AKIADs6wULLh+vaR0vR0ERcoNECgJQBwf+kahZq4Ert2XZOPygc23gg== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: af794e57-d99e-4144-869d-08db08b54336 X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB6117.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2023 02:44:41.5618 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e31cf5b5-ee69-4d5f-9c69-edeeda2458c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: U71+Wf31c/jRLLN8HaF4UGFxyN7jFB5hN5VPrPh2IrG/DlYBSFQj+GotPs+PZXYw7Cua4TPpGiHuRhfZIxHSOP+dIhAu9r5XzgzwwsPzetc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR04MB6521 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 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 Sender: "Binutils" <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757138538222314389?= X-GMAIL-MSGID: =?utf-8?q?1757138538222314389?= |
Series |
MIPS: allow link o32 objects with mach mips64r6 and mips32r6
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | success | Github commit url |
Commit Message
YunQiang Su
Feb. 7, 2023, 2:44 a.m. UTC
The `-32 -mips32r6` and `-32 mips64r6` option of gnu as will generate objects with different mach attributes. 0x90001407, noreorder, pic, cpic, nan2008, o32, mips32r6 vs 0xa0001507, noreorder, pic, cpic, 32bitmode, nan2008, o32, mips64r6 Let's allow link them togather, just like we did for r2 ones. bfd/ChangeLog: * elfxx-mips.c (mips_mach_extends_p): allow link o32 objects with mach mips64r6 and mips32r6. --- bfd/elfxx-mips.c | 4 ++++ 1 file changed, 4 insertions(+)
Comments
Sorry for the slow reply. YunQiang Su <yunqiang.su@cipunited.com> writes: > The `-32 -mips32r6` and `-32 mips64r6` option of gnu as > will generate objects with different mach attributes. > > 0x90001407, noreorder, pic, cpic, nan2008, o32, mips32r6 > vs > 0xa0001507, noreorder, pic, cpic, 32bitmode, nan2008, o32, mips64r6 > > Let's allow link them togather, just like we did for r2 ones. > > bfd/ChangeLog: > > * elfxx-mips.c (mips_mach_extends_p): allow link o32 objects > with mach mips64r6 and mips32r6. Looks good, but how about making this more systematic by applying it to all mipsisa32 revisions? E.g. have a second array of mips_mach_extension objects that gives the mipsisa32 base and corresponding mipsisa64 "extension" (ok, maybe not really an accurate term in this case, but good enough). Thanks, Richard > --- > bfd/elfxx-mips.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c > index e9fb61ff9e7..1790b78e822 100644 > --- a/bfd/elfxx-mips.c > +++ b/bfd/elfxx-mips.c > @@ -14600,6 +14600,10 @@ mips_mach_extends_p (unsigned long base, unsigned long extension) > && mips_mach_extends_p (bfd_mach_mipsisa64r2, extension)) > return true; > > + if (base == bfd_mach_mipsisa32r6 > + && mips_mach_extends_p (bfd_mach_mipsisa64r6, extension)) > + return true; > + > for (i = 0; i < ARRAY_SIZE (mips_mach_extensions); i++) > if (extension == mips_mach_extensions[i].extension) > {
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index e9fb61ff9e7..1790b78e822 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -14600,6 +14600,10 @@ mips_mach_extends_p (unsigned long base, unsigned long extension) && mips_mach_extends_p (bfd_mach_mipsisa64r2, extension)) return true; + if (base == bfd_mach_mipsisa32r6 + && mips_mach_extends_p (bfd_mach_mipsisa64r6, extension)) + return true; + for (i = 0; i < ARRAY_SIZE (mips_mach_extensions); i++) if (extension == mips_mach_extensions[i].extension) {