From patchwork Fri Nov 10 06:01:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 163774 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp913444vqs; Thu, 9 Nov 2023 22:02:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFl3sfDGBqZ3b+ACmW7fMuugRDoyUquey/BnKjp7bROXbAEH217w1ktZKpQQ7kpTxAQr/PU X-Received: by 2002:ac8:5e08:0:b0:418:2242:7823 with SMTP id h8-20020ac85e08000000b0041822427823mr7706507qtx.32.1699596164232; Thu, 09 Nov 2023 22:02:44 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1699596164; cv=pass; d=google.com; s=arc-20160816; b=CETudOb/ouq3mglpRt16t9oPtIuOgQGAlcl4A5HnhAW6H6rxMQwUoePnWuPQoI10t+ ShjVot38sgluLfpMq2vvFC/Px55LC9S/c0UfJkYvDvNz7HEs7AgJvGoB5FF/8A7J1LP5 8RYf/YfqIbM/YCsfIBVI43XZgHKWHyghvBTYWSUGP/N+hgrVZ9T1gcfHQR87ILf8PLMB WVS4nOR6lBP5ld+aPD1nLc/DU70iWoMi0fVj4grEgqeKKYZ6IMnMTGaVFKfLXBi/oHF6 mNQ++mhYNmpSC1PUpfn5ge6LQSvlZreZNmHWhMmg2/VVdUNTiVhNYSFNjt/oR0nE7fXb a//Q== 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:arc-filter:dmarc-filter:delivered-to; bh=BLpKj8FBKbivo+C1Y9oVFsAGjx8gQ2eKmJdzwio4+9A=; fh=zgn+771X4ysB7j9hSn7g/xv3tY8yVpzPfpfJXx/EswI=; b=VOM9NO6QhJNh8nCQA80+tvp38VFaQ+LY2CCyevR8I3Ixae9L+MZMY6zHDXnfoeMG4e Ad4l+0OwDZV4EvNQ1yst/vrlPQZzLKAZ6qQUTO2FqdpRqNHVBovVh0t15zZtmN4IU3QM z1zvfTZxuRsgpPVskHX6QXZBihcG2yBFG5dE24Rp3v3zxevbSd2rtW8I/ko8fpnMS8uW CDOHwJ57nie0pjQVNjj34ifGcp7LXTRMlCYGSyNAcv0ay1G1Xj3HXGbHAPIFtAcsm2zb K9cbjHkiojLmrQ+sPIFPQliPdQFkEfSXdvkohMHArrtJdZ1MBxLTsabTy3iZmm2vjVfb k7lg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b="ha/tuisf"; 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" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id j8-20020ac85f88000000b004200131407asi4011013qta.244.2023.11.09.22.02.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 22:02:44 -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="ha/tuisf"; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 06733385773A for ; Fri, 10 Nov 2023 06:02:44 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2136.outbound.protection.outlook.com [40.107.215.136]) by sourceware.org (Postfix) with ESMTPS id 7E7313857C4F for ; Fri, 10 Nov 2023 06:02:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7E7313857C4F 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-Filter: OpenARC Filter v1.0.0 sourceware.org 7E7313857C4F Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.215.136 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1699596159; cv=pass; b=cbuNX0nHFpmrsILskUe603MHYf3ilvW6+3S0QFDi4c37nkwvhCQpmywSHkwefTQ0O10wHjHSqunUSoqMI+olzWw6Ydn3WS4pjuLFRAl5EWyaJMwbbWICS+pqu/OAsMOPoYo2Kcmh63sBaObPcrBuyjLMXzlCaCb46qX8lqJVRdw= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1699596159; c=relaxed/simple; bh=XtJ+3vAl/mgQS0FUIohCvyoQHFuN33W1Oc72d58wfyY=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=pPO40BtgXiuOUVeVPn4+b2YRSIUtpxoMJx5XESlHV+SJaY9i9fBQs6lQtbygPSZLqoZZvrFJP52M1r2WhkHgQwv/4CqQkY2fpV4pbckdKtjYetXtQ1o4mo0P+F26g9VlO18dOI+XJA4qXQN0JlOK406olmQ6cq4125kbOhyHL4k= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PY+Dik/Hxvp+ZkZpnlbI+YSAY+kBpetYBIMpKwYvjn+E4x1Aeld2t7cCBMU6+gqZI2UR4wOxHGpn9wxBTzj+seAwWTklroEnWH4BcrtSCNT9Xa1E8jc0nGxvkTiqpLp1bF8sra6attNqWObIcqRR6Us01PVHKd9ycPv6LZPomub3TQGM6R90rWuLf7EISTLQPXi6wSSi3Jy/SnHfjJGsEtzJtRt8/I3dSsnVnYu4AKK0F22BxojQFwFd4KsumB7MImexABi/RF3KZzkA9RGOV4R44RECotQh/AeJoHr1YxChtRxyU1j352Dn35l6T79Sk7tYwybhHWA3d8IqbW4GeA== 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=BLpKj8FBKbivo+C1Y9oVFsAGjx8gQ2eKmJdzwio4+9A=; b=DPxXm79kVZ+t8WQSz3H3w8KRPS3NHKWs4XEmoQ52A4ZBeG0+wvE6ywRTVN1CJTiFRFHd0SU/6QMCSth6Gj7sRMn5FxqvKCqkifa+HPgl4No31l6n2s/ZeLyiO53Qah+VKPZglH2epVdNj95EoKU7PrXGvp7u8P2mlXWrGqQLgQqK+pMQpRhCdp0O0J0xG8nUa0ybzI+WkoAtB7x5VIhLqw91vzpmzH+hqU2Pi8AX6VJqT4EYIzlReU1dNNu8OuGVkZZcsKb67fczasQ/beH1aNAWkzkFtMAup9G4zxaxf8WvSAtHRQzoZjgNPLVG0Kl9aRsdLJsQg8LULZ+S1095hA== 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=BLpKj8FBKbivo+C1Y9oVFsAGjx8gQ2eKmJdzwio4+9A=; b=ha/tuisfaKM9U5JuavVofxerK1s81u5ivnbPhILa95nBeW2/IJLAbIivJ0m98B4j/PWw6nPT7kQHXozAO3v/+clE6tqXoGod8XaBjnWt4mAj4kBPASW/KY14jbkYxdIrOiVCt/r2ydzAm6Dcc7lHshvKruntxbTWK5VXV6B2gY8= 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 SEZPR04MB7487.apcprd04.prod.outlook.com (2603:1096:101:1ed::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.19; Fri, 10 Nov 2023 06:02:29 +0000 Received: from TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::41df:8aa2:5d9c:5f88]) by TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::41df:8aa2:5d9c:5f88%4]) with mapi id 15.20.6954.029; Fri, 10 Nov 2023 06:02:28 +0000 From: YunQiang Su To: nickc@redhat.com Cc: binutils@sourceware.org, YunQiang Su Subject: [PATCH v3] GAS/MIPS: Add mips16-e-irix.d testcase Date: Fri, 10 Nov 2023 14:01:33 +0800 Message-Id: <20231110060133.496600-1-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.39.2 X-ClientProxiedBy: MW4P222CA0018.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::23) To TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR04MB6117:EE_|SEZPR04MB7487:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a04e4cf-2cec-48b7-4514-08dbe1b29e8e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +SjfOIm9v+ojPu4gWUPVMg4AC+vVm188V+arUFTbJm3Ri1DvIL07baraZReJBjzGAQu/wu/iQnh7X5oDTydhr4mQB+lW+txTm2e2X+ueH4iyx44zYWXaDgvBZQeADVxH1cfXDgF3YGlicIPDVsE7pxp1bijYwD8FsB+EkSyPEsM5qJ6WQruot3/8uOReFZPrSSPiNpyTExmzzWoaFTfcN0fC33tuU6ELz5sC1+DWFP6c/9WIhudwSCxkez3TJalIrQ6HBM8eMTuNneF1b61J1hrqr3MpBYf1jSotX1g1m2zNUXt6P9ubbhBwYAlzuTkqbm1b6YpyEsrXwTHuiXkuwYk6LVnGsQyA7gg/5wcxhQMLPrIAGgivji3TU2fzBcnHRblA0bUvKnp/stFLbtXRDVdn0kilwKqNEDw6xXr0VNyECSaxe2OUrntDaQ3R3DJC0j6bCz3nUuXT3z0g1yrzbDpW062XeWqXWxY489eaH32GD1rGoa9EXgm7bsM9FQmMHz68aY86yxy511Q8FAOhxIl0NYruu6ob1janKE06q58rOTk9hl/z9QYnfBsaL5+ztp+zOfVD4qqaiE4h+PZgXjLQD+kWWoRehniYFJPD8G2MWQRg97+QHvACTAvWGHwW 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:(13230031)(136003)(346002)(396003)(376002)(366004)(39830400003)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(478600001)(2616005)(52116002)(107886003)(6666004)(6486002)(1076003)(6506007)(6512007)(36756003)(38100700002)(86362001)(5660300002)(66946007)(6916009)(316002)(66556008)(41300700001)(26005)(2906002)(83380400001)(66476007)(38350700005)(8936002)(8676002)(4326008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3kFUWY83u7XdziB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1d4GVXALLpuxKYiaqvEStwGrTySDHZH7mszUNPum+ttFZp0Tlqj8tlr3rOVaqMzab0pnm5zEjESfygg/fyuu4uMFPggwY9KU1iF13uz1DvLIIr897lLAPWg6JuhYNFXP50lZiVa6STx5fD3lw8UU3F6LF7gf//B+6eDp6Cvh2v02A9IOimsk+NgyyljRxsbpw3Ldovx8/pD2Ea+AL7wTf9ty8YbILAOpIXct3RP6aefJiOtF0HFHE78M8YuLi+/6KK+F9Oc+Rwtwt46sxzJ3bU+ruVumnseUxBPG5a71NTFwdAiP4HbeWcSvAqYeLdXUaa26yfoFxWqWGZqi9Bzn6SvGOeYCBGKykOyiNyEsgfoAeQeflGoZx8UtRel38GnQB6OCOTaz25nj6IFj4IiKmLwc0hr/NL3gzb7OVM09wq1KFfCY3Z0sgihMD60O5AAvPIPsGZ9D/aGMhYO2qsr6gLPu20Nsvk87ogqovFeVrIHVP14gfwZF82arGU4n1GZdC8XM8RMPSxleXA== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a04e4cf-2cec-48b7-4514-08dbe1b29e8e X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB6117.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2023 06:02:28.5612 (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: Dxj6OMq4qYDl8lIoDH05znpvUPtvoBNNxXwjqlsIcvIwN3g8CbwnvfDnEuTOuh9yVvAQlUsW7PNx486dQai/DmXOF1mTLXd71YbDCaGr9kg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR04MB7487 X-Spam-Status: No, score=-13.2 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.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782155747758892238 X-GMAIL-MSGID: 1782155747758892238 The Irix 5 and 6 assemblers set the type of any common symbol and any undefined non-function symbol to STT_OBJECT. The symbol "g1" in the testcase 'mips16-e' is an example. We add this testcase with helping of ${imips} variable, so that we can run this test for Irix triples, and run mips16-e on other mips platforms. gas/ChangeLog: * testsuite/gas/mips/mips.exp: Add imips to mips16-e, so that Irix can use different testcase. * gas/mips/mips16-e-irix.d: New file. --- gas/testsuite/gas/mips/mips.exp | 2 +- gas/testsuite/gas/mips/mips16-e-irix.d | 50 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/mips/mips16-e-irix.d diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 91cf8b11077..96f7c554eeb 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -1242,7 +1242,7 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "comdat-reloc" - run_dump_test "${tmips}mips${el}16-e" + run_dump_test "${tmips}mips${el}16-e${imips}" run_dump_test "${tmips}mips${el}16-f" run_dump_test "elf-consthilo" diff --git a/gas/testsuite/gas/mips/mips16-e-irix.d b/gas/testsuite/gas/mips/mips16-e-irix.d new file mode 100644 index 00000000000..52459cb97f7 --- /dev/null +++ b/gas/testsuite/gas/mips/mips16-e-irix.d @@ -0,0 +1,50 @@ +#objdump: -rst --special-syms -mips16 +#name: MIPS16 reloc +#as: -32 -mips16 +#source: mips16-e.s + +# The Irix 5 and 6 assemblers set the type of any common symbol and +# any undefined non-function symbol to STT_OBJECT, 'g1' here. +# See `mips_frob_symbol` in tc-mips.c. + +# Check MIPS16 reloc processing + +.*: +file format elf32-bigmips + +SYMBOL TABLE: +0+0000000 l d \.text 0+0000000 \.text +0+0000000 l d \.data 0+0000000 \.data +0+0000000 l d \.bss 0+0000000 \.bss +0+0000000 l d foo 0+0000000 foo +0+0000000 l d \.reginfo 0+0000000 \.reginfo +0+0000000 l d \.MIPS\.abiflags 0+0000000 \.MIPS\.abiflags +0+0000000 l d \.(mdebug|pdr) 0+0000000 \.mdebug|\.pdr +0+0000000 l d \.gnu\.attributes 0+0000000 \.gnu\.attributes +0+0000002 l \.text 0+0000000 0xf0 l1 +0+0000004 l \.text 0+0000000 0xf0 \.L11 +0+0000000 O \*UND\* 0+0000000 g1 + + +RELOCATION RECORDS FOR \[foo\]: +OFFSET +TYPE +VALUE +0+0000000 R_MIPS_32 l1 +0+0000004 R_MIPS_32 l1 +0+0000008 R_MIPS_32 \.L1.*1 +0+000000c R_MIPS_32 \.L1.*1 +0+0000010 R_MIPS_32 g1 +0+0000014 R_MIPS_32 g1 + + +Contents of section \.text: + 0000 65006500 65006500 65006500 65006500 .* +Contents of section \.reginfo: + 0000 00010000 00000000 00000000 00000000 .* + 0010 00000000 00000000 .* +Contents of section \.MIPS\.abiflags: + .* + .* +Contents of section foo: + 0000 00000000 00000008 00000000 00000003 .* + 0010 00000000 00000008 00000000 00000000 .* +Contents of section \.gnu\.attributes: + .*