From patchwork Mon Oct 9 07:09:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 149851 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp1694321vqo; Mon, 9 Oct 2023 00:10:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFFnNIeU92xBg8CUqtriowELxYfP9SDDpSgWtzImYORsVh0pXxrECyIATWNYZ8W/t/PcfIe X-Received: by 2002:a17:907:7818:b0:9a1:ddb9:6546 with SMTP id la24-20020a170907781800b009a1ddb96546mr12660350ejc.61.1696835415966; Mon, 09 Oct 2023 00:10:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696835415; cv=pass; d=google.com; s=arc-20160816; b=UwJOcAmQ7r7WgQLLWjjYPLmRufB7n7uSTnEbFrgsOepve7Y2SO+NtJBA02lV1fGQfN Q6bbVL/YQis6+ys68XSVuPEy0coK4eio06AF3Bh6F3pdGVGv4ArzQ5rOSBse7yuWn/EH npM2tn4shRLFgmEAoyBYUfK9BCourjawKeUVypBUEooW0HBC1hd7rkrbuMtJkq4Cyhme g3o9yHU/nNZIfYgHY5aP8cduyUNWT+euwd9G8mxOZ7mcbzThhv6AUPUvkPhZJlw4aBi+ cm0KiIcJIUyMvsH4Au0TkJfSqss73nIwVfHEQVBGqY46MvIi8s3IWJADb7M4nXJSgSOt eiHQ== ARC-Message-Signature: i=2; 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:dmarc-filter:delivered-to; bh=BLpKj8FBKbivo+C1Y9oVFsAGjx8gQ2eKmJdzwio4+9A=; fh=kxm2C2wSsiOJ6uzYknWdJXzhjqpAT3BNcPQeQ/2BlkQ=; b=IiXrA+LL1bkjnrTMheX/U0H2IKhCsmFnMcQODg/YM2T9uPcjkONGf/1J6UF1seTQQw 3uYGUCHHsiOtbI0NUzkEjcxA2aHH2qOQAFjc/hvg0tfGIPq6EWCYAfHxXTYYGuga3a+c jwQ+hiGK792yQz4PT3CmvO7uDcouABeTH+gne/EnP9de6zIf0Nj3VAI6mwNLiHTIu/QF VWcwslEgxArdFT/4aRw8XG/zmPZPru8ngS/w62kmB4YJ53II6iczS3vZuOGtpaQx9Vrj JuKp8YqMSQgY45iZxPqgQK6uhFYU3TUzjIvb3Gr4N+xIOWClh0j2V7nX1JzDufUTu/3p wBWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=jeWfWO7d; 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 (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id vm5-20020a170907b68500b009b9f4729c46si3490516ejc.782.2023.10.09.00.10.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 00:10:15 -0700 (PDT) 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=jeWfWO7d; 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 8CF4638582A1 for ; Mon, 9 Oct 2023 07:10:13 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2091.outbound.protection.outlook.com [40.107.255.91]) by sourceware.org (Postfix) with ESMTPS id CAA9A3858D1E for ; Mon, 9 Oct 2023 07:10:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CAA9A3858D1E 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=kM9p6bJ6LpwcU3n5flHtrZ9djGhINeeBghysPi0n/bgVqzrvlSBjkPC7epzC7a14QounQL/xQG+e+z2JgCX5wOOnIU7YmvHZfJv3dyJKj1XABSB1hfRPfifiXZYdnk2+FfoFgBtS5HsMtVC9rJyoaZQ5ia7nd2yx4AbUARQ5PNW7lbrwnE38IUdQhcgZgST0TwiLaoPzVKWB55ecAg1H/VPDqQ5z0qqqMiXxwPBSxuaxEHI3uYleSdw4TnA+VFNyNJCmmKCdT2WF9+BDCnc0S5e/SN98XOmBHCaaxvdzi9KiT6TAh9UfNRKk7kyMUMRnhEdNG8xFVe/e6lUad4CAKQ== 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=d/b3/JBdZrqP1M1ow4bheu+Yo1vJFtT/wAU9z0K4Hhk6af4Rfr850eUIMBorzkgLo/Vgg7afiC2UW5CSBTR/wnhczTF2CChxk4Im/SDE1lEZxHgPyeXm959gghKol+F6jQOXNHsTa43a+3+rxiwlogo2gCIYAVNVbCXRaW4X1OgL0oz4HSaFHFHMFgtddIyezQVRjbu3pPbu1t9sCpIOkDX7547fkeqelLYIxpPe77D0t1XEkWaStJ7wh8dr8ydXghoC4GXH4GVNn8kpq6M/CYa9NZnbNB9RAA+1wiej9PgLXmEQoIkrZQD4bex8wGz7h1YL+nN9g3Kzg0Cpv/qxzQ== 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=jeWfWO7dkWpEyTE2vuT2y7oanxp421/jd2+6LWkl9lB65fmrLJv5126ct+y8t29FRHfCBdXcvEQzxJnjvJ1U+mqloV4fG4oFSO0bqbK0cnXem6OmsTZg6teJrkWY1ifIUplaxd2bHIbgpPl9Z6086cohSkmI1fa+QcKZkcN2XV8= 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 TYZPR04MB4398.apcprd04.prod.outlook.com (2603:1096:400:2a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.43; Mon, 9 Oct 2023 07:09:57 +0000 Received: from TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::4dd8:54b2:69ba:2768]) by TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::4dd8:54b2:69ba:2768%2]) with mapi id 15.20.6863.032; Mon, 9 Oct 2023 07:09:57 +0000 From: YunQiang Su To: macro@orcam.me.uk Cc: binutils@sourceware.org, YunQiang Su Subject: [PATCH v2] GAS/MIPS: Add mips16-e-irix.d testcase Date: Mon, 9 Oct 2023 03:09:31 -0400 Message-Id: <20231009070931.3437078-1-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.39.2 X-ClientProxiedBy: SGXP274CA0022.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::34) To TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR04MB6117:EE_|TYZPR04MB4398:EE_ X-MS-Office365-Filtering-Correlation-Id: 232a6437-693b-45ee-40c2-08dbc896be9a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eSGVqfP+/zmN2MFr+wKkF21/zjOKQ4BK1Dkil+hF4OukA9gbQFa2T+wTk1CQzDe8g8E0xJUuzcIje9VKD3XWXRhDR43hxmVb08C8nUrEFWaUFSnjbX6EY7sDc90ZZvy2AgtChC2gF3+RhFxALkl7pBme8S8e0eYvK18blkhV578h5v/EKxe/lL2V9k37h/hj7GFWkvCu5xYM4OKYlUOoSUVhb9Rg/x08ooWnN7iASnSqWZuugLhWkN5MiUW1fDVEhEmR5Ks9QjiAOayPw68fOEm6gYtKIIWlezsnDOrgzmZUNg+C6EPyU7ysp0BKedSknEyAG0507TZslolq558LULqElTd2WDABtPIABr2EsC8q6cD+t0zGpanw7rR/tTPLPuNUe5phG6UhDLIdjT3bBIHz8qolGFgWHPPmA7+kmYNA5hihaGBOdxao2R3xRt2ORKLRijMlOdwEpU2/iwnPfvXN9/pC02nuTzF+Fa7fuU4FxGmRXzfjRKhGKZTeMo6U0d4XkAd3Sa5bUPUu7fstLIA9nx56lr/7izmo5c8GGpr4yp6suGVlHJV0wcgaB54GEexxGDTD2Pm8LHbzPRcgodNzc3CssZbLsyROLGW6wjoh9TadA8QQp+sCkLzVMkMJ 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)(346002)(136003)(396003)(39830400003)(366004)(376002)(230922051799003)(64100799003)(451199024)(1800799009)(186009)(38350700002)(38100700002)(86362001)(36756003)(2906002)(6512007)(478600001)(6486002)(41300700001)(8936002)(5660300002)(4326008)(8676002)(6666004)(6506007)(52116002)(83380400001)(2616005)(1076003)(107886003)(66556008)(66476007)(66946007)(6916009)(316002)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c3atOHq00FMOonmYr2bFC4z/o1I18f4Xz3G2j/Zz+LrfXO+s1GtVUIMP9IZ1ZqOarY6NjS1hxAZxZp1ehZhhIvkyQnbusZQneXBkt2nWv7TEsachHH5+8X6iM17CP6zgLomh07n5RR5dvrQrBcVOJfTvBPbnmp+ers/5WK0r/kKGncTDR4beW7qseVqycO4+BxMxvaFAeNhpjqNfrz/di7SLfQLsqPQj8azFaG8lU2dsyuLP2eeSue6iUCiU0H5uy4pe9WWe4sKhakMqaFEjk6u6q1T7pQCX0rUkgaVNTIgvtsW8ZkjtvQKLxUGw6LRZMJFw33n0t4nTMVQVU2e9kZZootnJJVaCL6QtUiNXTsXoPFY/EQShslZg2PLBkSiWrh3FUkA9s6OPawHdqIgdOBRddF2z2tfe2iSAFNxfnz193CENHdV9O4rQAyMZc2Zdct29DbsM85QQrtUjnyE7jDq/DvibbvjEnWde0tqsUJOC0oYSNK7udMmP8+PJw6DQOp+bLy7wHKCyldGs6fi/O1W8hTpG+Qi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4MTdqLR75zLKhtkvBfQ== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: 232a6437-693b-45ee-40c2-08dbc896be9a X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB6117.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2023 07:09:57.3710 (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: BTVWUTl8bawllyfUVHbAR/tFOLcrpUpiPvuH6ftmY5EArQ/bIr1kAlLl50dqoIcsyhrm/imYWs+5rExtTXlcQh9oEtDL3pj9vFrAE7RWADo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR04MB4398 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 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: 1779260892895325908 X-GMAIL-MSGID: 1779260892895325908 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: + .*