Message ID | 20230605102225.3566958-1-yunqiang.su@cipunited.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <binutils-bounces+ouuuleilei=gmail.com@sourceware.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2578985vqr; Mon, 5 Jun 2023 03:22:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4aNghvFBnOr56ik3oauMZS4NgAz/NpJWM5Valt2AUIKwlHTh/HaZqv6e0xDE6sEicEcbTf X-Received: by 2002:a2e:b16b:0:b0:2af:1817:26e1 with SMTP id a11-20020a2eb16b000000b002af181726e1mr4187957ljm.30.1685960578139; Mon, 05 Jun 2023 03:22:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685960578; cv=pass; d=google.com; s=arc-20160816; b=sEACCeEs7FH4TSxE8Je+GTKLTayV36sA8mGW3+ADgY1hTH6Pb8cj9PQKvv2UnRnE4d 3wsIwpNGtRQPmXyajeW6cbPtuhvkkjCBS3tvMRetCFXzJsm5zWFBbi0cIrz6isck9W1B y6v2uUDD7KMPeImhKCAs2ZyBUs3mmnMnUVFWYs3eb+c/ZgMYIa2JiXG83clvt2b7j1Ql ahvekHK/PvoMeS8asN3EAqL8NeLu/JEao58aXnf1rs1nLkJ3MKEDQ9eHlZrgeVwRdpCi 02RwwzyqluayN7gdLxASvSkmdUeQcNPuKbGieYeQmpJDczB0C4mTr1YLtDs0vP0VlVPQ 9C1w== 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=UgofG8uvSpYuOIHZdw1b52HUhplaGvlhIuGKzkTnk6g=; b=QMJ7rer/QT0Y2hm3hjyoDRGk7QTyHd9/vZOoPPN7yhtEyhRqycVRoyUM4eUmYUfWEb kRZBXyOsfb+LjtX+NunXUYAsKktt5IlPa1lZWiXxrDFNrELv6U3mPYTbyaEKXwYlsxsK 6GQHftBCl18d0YtilriEw4gRsKuA4WWoRq4Dzv+a6FyPAZM1hzfLME+h7pxh2qFRjqYm lXK+XbQjMVeb/lgC8YQMZwPlvHIaN1dh6L+crKPd2k0V3YgsAFN8yvutPKEdPWBytmIH Ua3CnGNSR9hKaDng+YJ0luLyODNedIVdbqZxc31lnN8qsQ/mr7B86CsVvaUV1ighpTHS 8bhg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b="B//CFb66"; 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 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org" Received: from sourceware.org ([8.43.85.97]) by mx.google.com with ESMTPS id ba26-20020a0564021ada00b00515dbc44865si4570884edb.442.2023.06.05.03.22.57 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 03:22:58 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b="B//CFb66"; 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 8.43.85.97 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 B0D103853D3D for <ouuuleilei@gmail.com>; Mon, 5 Jun 2023 10:22:56 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2117.outbound.protection.outlook.com [40.107.215.117]) by sourceware.org (Postfix) with ESMTPS id E94B73858025 for <binutils@sourceware.org>; Mon, 5 Jun 2023 10:22:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E94B73858025 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=g5K7fqTOmWmVhOhaUix8fjFSgomRaNTW7+NUL0BRDl0VwvWqy+Zk0S1Wg4Tw2+9cA9yewa0h2ItYeVFx2nB9KW22zgtD2NLwlKdiMbEOQRiGANO1XhjbRHLdYzSWozeSojVGgh45tLDZMndQIYjUp8TXIWDS15HjqeLTeLGo5IgkeUvZPInF/PnXcWxLKy4oVR1EyMVfPyjqjjK40O2EnXQxsN/da+UMgbPCufo3rE/NIXljyKc77i88arg+nUxNbH2WR4u71BWtT5jIloVuN7ia8q1Bz7JG/oNe9JTbg/a0W2Ht5OgfFFX0puGlF0yq+yWX81Zcg4qbSI2sZXdQ1A== 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=UgofG8uvSpYuOIHZdw1b52HUhplaGvlhIuGKzkTnk6g=; b=VzJcd9Eft6ssgLirwbVK/hws5/Yp4JBdAfzB2hnDY2u/XENqn0rPw/NfyN0P6HDRKixAp7aax1EETAj3tvnzmRWDupkxtZDURwVwbdq+Q1Ld2iXt2lu701TVNooALYtpTa5f5RwfG6x01Vgj32WdoLpmRM0V44ii93CH4Au/rJJGX4PMp3TWxtHyenTxi4/p8Sa8yzFqg+FnPHhOTlPVhvEsTSr2W/0+xR0hfRtEBq9665RpVxkw1J03PRbNrKCE4NmdMmwuaAra9KxWIF6+ZWcFKgsVxjp4B1l3vcSyTcNism1nqWyZFpsc8/xcHjA7Ok41BsOM+X36rj8x7LlmwA== 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=UgofG8uvSpYuOIHZdw1b52HUhplaGvlhIuGKzkTnk6g=; b=B//CFb665Ow7GCHHp2NIVDssI0d4fZL26zMs5IrHy/52yuL3I1tlwYwsyUTNOX/O9SuyVPQr5i0CohiKv8eq2rYqsgeIGAstHZ8jqbS/STI7M36sFwYuvWLolHwbBBvOtE0FWZYitnlLVEczOZIUmNC+sXCKiLa1q/1oTG99Q+I= 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 KL1PR0401MB4244.apcprd04.prod.outlook.com (2603:1096:820:21::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Mon, 5 Jun 2023 10:22:44 +0000 Received: from TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::1b49:5a4:7b95:a128]) by TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::1b49:5a4:7b95:a128%6]) with mapi id 15.20.6455.030; Mon, 5 Jun 2023 10:22:43 +0000 From: YunQiang Su <yunqiang.su@cipunited.com> To: binutils@sourceware.org Cc: amodra@gmail.com, YunQiang Su <yunqiang.su@cipunited.com> Subject: [PATCH 1/2] MIPS: Add n32 VECs to non-vendor elf targets Date: Mon, 5 Jun 2023 18:22:24 +0800 Message-Id: <20230605102225.3566958-1-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.30.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYCPR01CA0168.jpnprd01.prod.outlook.com (2603:1096:400:2b2::8) To TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR04MB6117:EE_|KL1PR0401MB4244:EE_ X-MS-Office365-Filtering-Correlation-Id: f73f6f0e-d15d-41e4-f447-08db65aecc71 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9muO+CdkIeEXjniKwPZUEupIz/IQ4y/Aa8hNzFV0Kl0KkBEb6j86K0cueze/3M8PDTLB3ivFuJSwjP83ejp2k+ZwVMlUJvFuYkJKHr4kXqpYzhzvs6Ckt8hPieMz7nIuhtwnHu5qRGur+yDuA7h0ecESTQwlz64Ao2wgNQ1yiWhFFsD2pSTSOy3GttzbG6U9xxuTZzdbH09DQ6Ilr7zWTonKXhuN72rDSLxy33shjcNSLGYScvuASRpnY6o61Ylo5MKY0yS+codWxZ1bHGhwcFEpN1RnAgw4HbTB4nagujUpjkFMfmBleLGAEVwYejAXiKKbCQmcL7b7AZj/rpRcUv56evHvy1fLYseSLt/PVpDO1G7KNit3ql8UcrtmGSDZuUd0lAConalpUdnnV5Ll52uUAEhctZZQOFTGaviIAKWXpU3z0sSLnzL+X8ty5Up8iCiywV86/anoRJaDsizQpXuIc9dNlNqePkeuf59CPo28mswypo2AR9vPQK0Ks4XV+pYdetja4aADvy8Wf3gUeO8HRFS4AGYe6kB1AjZG5xqq7uH9EEOfjberud3X77trWCnVhHtSw657mcCmbo95ZT7xCP1O5YEfj6Jq/bNl/QZCC/lAxHymsjCA6SW6Bprx 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:(13230028)(39830400003)(136003)(396003)(376002)(346002)(366004)(451199021)(83380400001)(4326008)(6916009)(38100700002)(66476007)(66946007)(66556008)(38350700002)(6666004)(52116002)(6486002)(478600001)(36756003)(186003)(2906002)(8676002)(8936002)(41300700001)(316002)(2616005)(5660300002)(86362001)(107886003)(26005)(1076003)(6506007)(6512007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Mrlg1/ntOz+8IrigxvgPeuUIl0V7hh5dXQrEqnnq4QuR87q8Lg816f790LVnaa3Z5QkNHbsTbumCVPBwMFWBqozHxLKb2dsfSExD7QChqgvAZZrK8Dl+vMpgI1r4YeJ5DanuaBRBzEHdwPmggLLOrTBXynHnegcYRtSXjhp+keulV4R8JOCg2uE7B5scpEzzF7/cQb7JDC1IeA95eLZvwGStbkm3p5qDbsJ5/J7rXl4mQ+Ach8Q1n/I/BaSjn4WZBIb2eigf0l+ia3qYnkDYFeYYhajdpGcRBSTOkES4WXXPVxjtQ29QBskk3yjSxz3bvacusSzpd48mGe5FizyAd+I0/nSY/DTmandzT2yCnNBLwuEsE+oiYmITCRVIEjtTP3wg9MTKtb5gi03MaNe0I2UBl0En2XCuhBQesQ2un30yjmtUehbsLe8Vg9hGsTtFcSaVBuExLf3gVC6kIJpGxHxQRPES0VPn0oOtYgRTv6fBsKeTdavofLlugR8GLU5j9q7vzBFwx79V3YYK87uXCOOGYRF8xz0b9o1/ePHUy94gt8RiACuq3fV5zqbf/jJqkbJobEckF42lcWPsNf8oPXgglY0QleZVUvuhSnv1bigj/C8+/JISL6uM2WLaT8reirfD+zyq1eWfytqTcIySjKsPeLKW5nKzXEWv/4Nz7IYOUk4b38b9k0PTmrPmQ2FVkQWpj0Q9TNUNF5F1mHUbDuw7fzcIOf5jrko7ncb7JaDWuxE812PKT1wNRDXqmSkZRx/qzHjTUUgjT6sNcMlzMBNomm09QgMsIaJnmc+4l1ARdXGOhHKQPfYw4V2aH0fA1wdK/MmWeWMxN/9af41K3cpYFBp5/FSHREX5T8wsdcL5NmjcLkrEw5FNEirrrTuYyDA01PjA4gHYj8IPijszwdo2gMjMlsp+4mEXhhaI8gjiUl3EwhsSoz01Ac+i3w0g7JbcGlsjkZ56WRD7L9901FMymIKkqsNP6bS9E5T3gPZRQK+ZdHABCaNw9G4T067lds2DQrTIpMtv8TmSHWGmj3mCy3QytifNDa6cdCvAYDRiIEzJ3R4AP7z53Yc4lRDB09JemseezKrlbBfeeTV0QKG7fb8fgbUEl/SbRAfArH2mAa5gS4/xjgQyEUldQueyFNLmbhyhKAw2kNkNn6smbsdCTzXhzCX9bv74vJ7tQUGu7zFbdEo/Ish1/tJDwxmvNoQVe5SM58Y33jHub111x4Lly/87IqD6ae7Ji20V4GYmTt7fuK8g7762XvnGYEiigsBRTt9c1QZIvXVvuVAaNrxQ2cnUIeimyuu9i8uX2L0Njj7f2uCoPnYwdW/ww4KS9EOoOSUoGeTuKRc4ykpsoqFWbdEP4xYo/qBxGcvbO6yJayUd9J73F5wWdIvyIES3Nn47XXzoWv9Ya/LlcXiUvM9gQoGGg3TiOyicpGcwLflZKB+r464+tXJBz8psgfsY1h0rpoJ+5ouGtYvRdxKYeaDraDgjnUOkHMRQLG0VlDpSG1fLe0hCiM6tRgPVOkhxFAiy2706piydfPkFTPOUTaWmmIyvqF+Qzf3xVB4YAiNQ3uG5Deiaa5+drbZ6zEKyUdNBLtAN5k9rA0kPOjsgag== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: f73f6f0e-d15d-41e4-f447-08db65aecc71 X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB6117.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2023 10:22:43.6007 (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: kHfw9LHtPP1XEbVNsxEyY58Nf1TqejDEkiArOLjtacqF+H41gSPEzQt29lBaTpys9BHcwDoLmvuqwEUL2eKsb9cvCKI32rOVS5zjZN4HLFc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0401MB4244 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, 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.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?1767857799322848874?= X-GMAIL-MSGID: =?utf-8?q?1767857799322848874?= |
Series |
[1/2] MIPS: Add n32 VECs to non-vendor elf targets
|
|
Checks
Context | Check | Description |
---|---|---|
snail/binutils-gdb-check | warning | Git am fail log |
Commit Message
YunQiang Su
June 5, 2023, 10:22 a.m. UTC
For triples mips*-elf without vendor, such as mipsisa32r2el-elf, mipstx39-elf, the NUBI is used. These targets use non-trad VECs. Currently, N32 VECs are missing from targ_selvecs in bfd/config.bfd. Let's add them. This patch also fixes gas testcases for these targets. bfd: * config.bfd (mips*-*-elf*): add N32 VECs. (mips*el-*-elf*): Ditto. --- bfd/config.bfd | 4 ++-- gas/testsuite/gas/mips/comdat-reloc-r6.d | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Comments
On Mon, 5 Jun 2023, YunQiang Su wrote: > For triples mips*-elf without vendor, such as mipsisa32r2el-elf, > mipstx39-elf, the NUBI is used. These targets use non-trad VECs. I guess you mean the IRIX variant of the psABI. NUBI has never been deployed. > Currently, N32 VECs are missing from targ_selvecs in bfd/config.bfd. > Let's add them. NAK, the submitters of these targets had their reasons not to include n32. > This patch also fixes gas testcases for these targets. This is backwards. Any irrelevant tests just need to be disabled for targets that do not have n32 support enabled. Please follow the ${has_newabi} approach for now, or if you can be bothered port binutils/testsuite/binutils-all/mips/mips.exp approach, which I implemented a while ago that is cleaner (it has an advantage of also supporting targets that do not have o32 support enabled; yes, we do have such ones too). > diff --git a/gas/testsuite/gas/mips/comdat-reloc-r6.d b/gas/testsuite/gas/mips/comdat-reloc-r6.d > index 513589e73d3..f7d9a4e57c0 100644 > --- a/gas/testsuite/gas/mips/comdat-reloc-r6.d > +++ b/gas/testsuite/gas/mips/comdat-reloc-r6.d > @@ -26,9 +26,9 @@ Relocation section '\.rel\.text\.bar' at offset .+ contains .+ entries: > Offset Info Type Sym\.Value Sym\. Name > 00000000 ......05 R_MIPS_HI16 00000000 _gp_disp > 00000004 ......06 R_MIPS_LO16 00000000 _gp_disp > -0000000c 0000070a R_MIPS_PC16 00000020 \.L1\^B1 > +0000000c 00000[7d]0a R_MIPS_PC16 00000020 \.L1\^B1 > 00000014 ......09 R_MIPS_GOT16 00000000 foo > 00000024 ......09 R_MIPS_GOT16 00000000 foo > 0000001c ......06 R_MIPS_LO16 00000000 foo > -00000020 0000080a R_MIPS_PC16 00000018 \.L0\^B1 > +00000020 00000[8e]0a R_MIPS_PC16 00000018 \.L0\^B1 > #pass Where do these differences come from? Maciej
Maciej W. Rozycki <macro@orcam.me.uk> 于2023年6月6日周二 07:37写道: > > On Mon, 5 Jun 2023, YunQiang Su wrote: > > > For triples mips*-elf without vendor, such as mipsisa32r2el-elf, > > mipstx39-elf, the NUBI is used. These targets use non-trad VECs. > > I guess you mean the IRIX variant of the psABI. NUBI has never been > deployed. > Ohh, yes. > > Currently, N32 VECs are missing from targ_selvecs in bfd/config.bfd. > > Let's add them. > > NAK, the submitters of these targets had their reasons not to include > n32. > Ohh, it is reasonable. You are right. anyway, nobody is using this triple as far as I know. Just block these tests won't be a problem. > > This patch also fixes gas testcases for these targets. > > This is backwards. Any irrelevant tests just need to be disabled for > targets that do not have n32 support enabled. > I will update my patch. > Please follow the ${has_newabi} approach for now, or if you can be > bothered port binutils/testsuite/binutils-all/mips/mips.exp approach, > which I implemented a while ago that is cleaner (it has an advantage of > also supporting targets that do not have o32 support enabled; yes, we do > have such ones too). > > > diff --git a/gas/testsuite/gas/mips/comdat-reloc-r6.d b/gas/testsuite/gas/mips/comdat-reloc-r6.d > > index 513589e73d3..f7d9a4e57c0 100644 > > --- a/gas/testsuite/gas/mips/comdat-reloc-r6.d > > +++ b/gas/testsuite/gas/mips/comdat-reloc-r6.d > > @@ -26,9 +26,9 @@ Relocation section '\.rel\.text\.bar' at offset .+ contains .+ entries: > > Offset Info Type Sym\.Value Sym\. Name > > 00000000 ......05 R_MIPS_HI16 00000000 _gp_disp > > 00000004 ......06 R_MIPS_LO16 00000000 _gp_disp > > -0000000c 0000070a R_MIPS_PC16 00000020 \.L1\^B1 > > +0000000c 00000[7d]0a R_MIPS_PC16 00000020 \.L1\^B1 > > 00000014 ......09 R_MIPS_GOT16 00000000 foo > > 00000024 ......09 R_MIPS_GOT16 00000000 foo > > 0000001c ......06 R_MIPS_LO16 00000000 foo > > -00000020 0000080a R_MIPS_PC16 00000018 \.L0\^B1 > > +00000020 00000[8e]0a R_MIPS_PC16 00000018 \.L0\^B1 > > #pass > > Where do these differences come from? > It looks like that the order of symbols is different. I will edit comdat-reloc-r6.d, use `.' for the SYM index section in r_info, just like other symbols. Symbol table '.symtab' contains 15 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 SECTION LOCAL DEFAULT 2 .text 2: 00000000 0 SECTION LOCAL DEFAULT 3 .data 3: 00000000 0 SECTION LOCAL DEFAULT 4 .bss 4: 00000000 0 SECTION LOCAL DEFAULT 7 .text.foo 5: 00000000 8 FUNC LOCAL DEFAULT 7 foo 6: 00000000 0 SECTION LOCAL DEFAULT 8 .text.bar 7: 00000020 0 NOTYPE LOCAL DEFAULT 8 .L1^B1 8: 00000018 0 NOTYPE LOCAL DEFAULT 8 .L^B1 9: 00000000 0 SECTION LOCAL DEFAULT 5 .reginfo 10: 00000000 0 SECTION LOCAL DEFAULT 6 .MIPS.abiflags 11: 00000000 0 SECTION LOCAL DEFAULT 10 .gnu.attributes 12: 00000000 0 SECTION LOCAL DEFAULT 1 .group 13: 00000000 40 FUNC GLOBAL DEFAULT 8 bar 14: 00000000 0 OBJECT GLOBAL DEFAULT UND _gp_disp vs Symbol table '.symtab' contains 15 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 SECTION LOCAL DEFAULT 2 .text 2: 00000000 0 SECTION LOCAL DEFAULT 3 .data 3: 00000000 0 SECTION LOCAL DEFAULT 4 .bss 4: 00000000 0 SECTION LOCAL DEFAULT 7 .text.foo 5: 00000000 0 SECTION LOCAL DEFAULT 8 .text.bar 6: 00000000 0 SECTION LOCAL DEFAULT 5 .reginfo 7: 00000000 0 SECTION LOCAL DEFAULT 6 .MIPS.abiflags 8: 00000000 0 SECTION LOCAL DEFAULT 10 .gnu.attributes 9: 00000000 0 SECTION LOCAL DEFAULT 1 .group 10: 00000000 8 FUNC LOCAL DEFAULT 7 foo 11: 00000000 40 FUNC GLOBAL DEFAULT 8 bar 12: 00000000 0 OBJECT GLOBAL DEFAULT UND _gp_disp 13: 00000020 0 NOTYPE LOCAL DEFAULT 8 .L1^B1 14: 00000018 0 NOTYPE LOCAL DEFAULT 8 .L0^B1 > Maciej
On Tue, 6 Jun 2023, YunQiang Su wrote: > > > diff --git a/gas/testsuite/gas/mips/comdat-reloc-r6.d b/gas/testsuite/gas/mips/comdat-reloc-r6.d > > > index 513589e73d3..f7d9a4e57c0 100644 > > > --- a/gas/testsuite/gas/mips/comdat-reloc-r6.d > > > +++ b/gas/testsuite/gas/mips/comdat-reloc-r6.d > > > @@ -26,9 +26,9 @@ Relocation section '\.rel\.text\.bar' at offset .+ contains .+ entries: > > > Offset Info Type Sym\.Value Sym\. Name > > > 00000000 ......05 R_MIPS_HI16 00000000 _gp_disp > > > 00000004 ......06 R_MIPS_LO16 00000000 _gp_disp > > > -0000000c 0000070a R_MIPS_PC16 00000020 \.L1\^B1 > > > +0000000c 00000[7d]0a R_MIPS_PC16 00000020 \.L1\^B1 > > > 00000014 ......09 R_MIPS_GOT16 00000000 foo > > > 00000024 ......09 R_MIPS_GOT16 00000000 foo > > > 0000001c ......06 R_MIPS_LO16 00000000 foo > > > -00000020 0000080a R_MIPS_PC16 00000018 \.L0\^B1 > > > +00000020 00000[8e]0a R_MIPS_PC16 00000018 \.L0\^B1 > > > #pass > > > > Where do these differences come from? > > It looks like that the order of symbols is different. Right, the IRIX psABI wants symbols to be sorted according to a different rule; this is probably the most prominent divergence between the two MIPS psABIs. It did not occur to me it is the symbol indices that are involved here. The difference in symbol indices would have best been mentioned in the change description: these descriptions are meant to make it easier to the reviewer to understand the change and to convince them that the change is indeed correct. And the easier a review is the quicker you will get it. If it takes a minute and just reading through the submission to decide that a change is correct, then you you will get your change reviewed quickly. If one has to wade through sources to collect bits of information so as to understand what the change is really about, then the likelihood of a fast review goes down very quickly. Good coding style also helps as one doesn't get distracted by mechanical clean-ups. > I will edit comdat-reloc-r6.d, use `.' for the SYM index section in r_info, > just like other symbols. It is the correct approach given how the original test has been written. It is also a fix to a recent addition, which just shows why getting things properly reviewed is so important. Maciej
diff --git a/bfd/config.bfd b/bfd/config.bfd index 78752994456..2927f35b614 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -923,11 +923,11 @@ case "${targ}" in ;; mips*el-*-elf* | mips*-*-chorus*) targ_defvec=mips_elf32_le_vec - targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec" + targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec mips_elf32_n_be_vec mips_elf32_n_le_vec" ;; mips*-*-elf* | mips*-*-rtems* | mips*-*-windiss | mips*-*-none) targ_defvec=mips_elf32_be_vec - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec" + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_elf32_n_be_vec mips_elf32_n_le_vec" ;; mips64*-*-openbsd*) targ_defvec=mips_elf64_trad_be_vec diff --git a/gas/testsuite/gas/mips/comdat-reloc-r6.d b/gas/testsuite/gas/mips/comdat-reloc-r6.d index 513589e73d3..f7d9a4e57c0 100644 --- a/gas/testsuite/gas/mips/comdat-reloc-r6.d +++ b/gas/testsuite/gas/mips/comdat-reloc-r6.d @@ -26,9 +26,9 @@ Relocation section '\.rel\.text\.bar' at offset .+ contains .+ entries: Offset Info Type Sym\.Value Sym\. Name 00000000 ......05 R_MIPS_HI16 00000000 _gp_disp 00000004 ......06 R_MIPS_LO16 00000000 _gp_disp -0000000c 0000070a R_MIPS_PC16 00000020 \.L1\^B1 +0000000c 00000[7d]0a R_MIPS_PC16 00000020 \.L1\^B1 00000014 ......09 R_MIPS_GOT16 00000000 foo 00000024 ......09 R_MIPS_GOT16 00000000 foo 0000001c ......06 R_MIPS_LO16 00000000 foo -00000020 0000080a R_MIPS_PC16 00000018 \.L0\^B1 +00000020 00000[8e]0a R_MIPS_PC16 00000018 \.L0\^B1 #pass