From patchwork Tue Jun 6 04:03:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 103544 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3127118vqr; Mon, 5 Jun 2023 21:05:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7GydJBseZ97EiLk53ZIDaHZt31raF9maL6drm7gcy/mq5UX0b2i4h6cX6XDLk4LQPPEzLE X-Received: by 2002:a17:907:7d8c:b0:961:b0:3dfd with SMTP id oz12-20020a1709077d8c00b0096100b03dfdmr941009ejc.7.1686024314865; Mon, 05 Jun 2023 21:05:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686024314; cv=pass; d=google.com; s=arc-20160816; b=X7F8wkRH7MdeA//aQfIONrFh6EhLZSf2TasutLmeHLO/0huS26UWCz+HrFsple59ro ddS7KTzrBev6XhepNKg34irOtd9idg77c6m9MkoWdhgp2VtdUlHJZJfpfKz5NyEoXnKa bKprTO/8F7gFh3dXsU1m3QLGgiWpD5OyQKmksWMt4rwP9F9F6wLVCMb0QMpEi2WgFWl8 QwSaSOqOh0dklBfhRP47ZTr4XXHsTedOVuQd0o0CMxqOEa7Y89apK5k06VNtf4NlxJUe /OQf/+mnscjFDhH5oQbm2PsVq7nm48qnQlPUEHJ+nU0mPhFGl+Pt+lhtLaYRGbZpvQ9T ooiQ== 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:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dmarc-filter:delivered-to; bh=luBZuAAweKxQI8zojmxr7tADAw9JgYWRRpsIgMKy0+8=; b=N5KjI1R+xNa08O+TUhOE1o+NPPEDf9kaJTAR3ADE27pbFlzchsZmgCaxSvaXnU+hfR POl5mNK+Q+GQ8PjE2REypZMKvLS7199/oNKdmyi/pIjGuPHtQF6EtIM2nTT81ZwWDy/9 27qYLVCz/IrFzfqpL199ZnuPSsy+O/2+RP06ElnrOe2GlplqvaXFbeGIrTdwHKq+d0Fi qSbpzq/opjnE3fCAgyHdjbqZXcjHoyxh21JO8dRuYOKRZBgeEAWl7yTkLJrLzrBXLyUB /AA/9+xBVGYNSL08MoJRs1ha8W3RXmudZott4Bmqfc5ZNAcuFEoplLuv5zQkDGFbuCom dqgQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=VqKUZAlR; 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 s25-20020a170906bc5900b009745c47fb1fsi5612986ejv.330.2023.06.05.21.05.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 21:05:14 -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=VqKUZAlR; 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 071CC385C6D7 for ; Tue, 6 Jun 2023 04:04:22 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2115.outbound.protection.outlook.com [40.107.215.115]) by sourceware.org (Postfix) with ESMTPS id 7DD5C3857B8E for ; Tue, 6 Jun 2023 04:03:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7DD5C3857B8E 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=Pb/FM/I9pF9D/CVPY7Wx1gJzOtOP34wzOvl8MxubOeuaJidELtmF0ccyCLF7W76N2YyA3MdslwA8iVfPV3EMWnhhFAFV6y4iB8bThQsjla3+VjCXDqGhKieHeVeSyGcSD0r7u8htpXjoGTXHAepV53r2TBdUHwFQxnMkvWlK/KS5cJnSrZ8B3WWlp0o0hGbAyZmibur0Y5ggx3HDktmwpKd8owfW9yl4kIHBSu9GP52e0ijI8gV8hYRACMxVj3eNw1Y96VYpzzxBX7cfWiJ5gxF53NEglU8gFqhtna2mx+ir4MsYOxte82r4eKKEmF04PHzvBqca2Aj/nqNwJqNDfQ== 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=luBZuAAweKxQI8zojmxr7tADAw9JgYWRRpsIgMKy0+8=; b=R2SpLyTSYeSRkdkPcopxcNo6O3k7Lbm4pMahOjBSOGeJ337cCimzqNM1yGc5d3zbKaaoakNMSp3XGXBW3rpKsWNnyYE1lKVRcx7LzF+yHfZXR38mCbJiwLuqP8xLBjvOExEgG0uCTeIqn2czJz5SEcPvgg2QH3OrVbrYBCc4bVzKp/KYNquOm0Pu9yEzQ6YHN53Ivllfn6ecLtrjmX0w496vhkMzutHf5IJVaOFsc3KlBahuQie3lkVt9Wq/ukxSJj1qD0MWCYy9OHtxg7uudd3O39Z0/CjETA4s7OdDl+uqvqPc2C7oGCSK3oAIcI7bNtBmQqK2CqOytgoRN6vpKQ== 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=luBZuAAweKxQI8zojmxr7tADAw9JgYWRRpsIgMKy0+8=; b=VqKUZAlRLInUJYzdgr+X7t34gbY5r91KI0CXiNyzl7+hteLL4yn15eiWLtETOfkH34Dru2rXmdWxPlRk3Ym/7gXtAwHRcusp//eZuJdS2tgaA/uYGjDDWZbbXLHfXRCZ9dvlOTybziLCFTV8V9IwlJo/ZQb5IP2NNnKsgm/lvzA= 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 SG2PR04MB5842.apcprd04.prod.outlook.com (2603:1096:4:1df::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Tue, 6 Jun 2023 04:03: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; Tue, 6 Jun 2023 04:03:44 +0000 From: YunQiang Su To: binutils@sourceware.org Cc: amodra@gmail.com, macro@orcam.me.uk, YunQiang Su Subject: [PATCH v2 3/3] MIPS: Fix Irix gas testcases Date: Tue, 6 Jun 2023 12:03:15 +0800 Message-Id: <20230606040315.4000351-3-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230606040315.4000351-1-yunqiang.su@cipunited.com> References: <20230605102225.3566958-1-yunqiang.su@cipunited.com> <20230606040315.4000351-1-yunqiang.su@cipunited.com> X-ClientProxiedBy: SI2PR02CA0034.apcprd02.prod.outlook.com (2603:1096:4:195::9) To TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR04MB6117:EE_|SG2PR04MB5842:EE_ X-MS-Office365-Filtering-Correlation-Id: 39a96ba1-ef42-4b31-f9c8-08db66430545 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TJbaiybBc4kX+4y7Hl1FAYzacK6Dbn8Xs2rDn7odUSDXWEUBXJSlumrXpE70/pnesMXYOrux6z+xv3ipRwMNr+8kyoBjYHetWjp7fQdeHz6lXw8qscKNaq3CyZwYbBmzhW0eIYP8Q19YNv0n1D8P4Acg5O36nOV4tBe4l2lOmTrfuToWFn4Mr5/dVVdOVlwEkRsHA/n3w60hEkf4v/U5XsZg6KMS1aVTCWzNDxs/k84d/k7Bad6DDV8G8ldqj7wTxHF6FVjRisEaNu3IkcCSaOpwDkO6DAyKvPmGvuz2HQ7D4E4miUXa2kcBg6a/Yo2oXC+IKC/TD9Ht5eIAoLjLAw2cR9vieDaLuieySBJNU+meFAw8uTxXwEarnQBnmrd4eXJ5VB8PQ1HBVqOGLS3uuWx7nLMDsjGafKwcjVimVLNnwfovNFINkTMIFcJX3CwjiYIQ2oV6WeUmAL+4Fq3HVUzP1v0mCLjvytlNaR46YJHBGtnEi+z+h3SCWYykh+rnXnC74ZOFNfWkEA6GZJIvhF4TgRJh8sHUeXMupqWJTWa0gUnHamCiYPNa+Y7EHHv+sTBjm/6aOcI/tnrzC4rMEMdjiiGHeOmQCxX5R5w2InQ= 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)(136003)(346002)(396003)(39830400003)(366004)(376002)(451199021)(8676002)(66556008)(4326008)(66476007)(6916009)(8936002)(66946007)(5660300002)(316002)(41300700001)(2906002)(478600001)(38100700002)(6506007)(1076003)(6512007)(86362001)(26005)(38350700002)(186003)(107886003)(36756003)(6486002)(52116002)(2616005)(83380400001)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V9gC2YqHbE7h2RH1HPpKgRPPXHWMX8nU8wgNfixe1cYkDtpP8hL1bJNiwLcNqszx+XK3vLD4wcTtouoB3d/mgTV69drxQfwIWEtejLR65Sr0FS0SMtUGGKLUa1wF5WuzqRRkCUs7Ovcg7xFCCc7w0ORiU2lvjgja+0DOZZMWJme9fWv35lkHSuiHXUnydMZlnYkrZUuy1lKfsIkCg4qWSgU9rVjxpzYCYeg4tXEiryltqx4QlsZUG24IkyYTixdWN4p7vVN7iQS49TFGRKudisYNTA5pGaWbu9gQ8k4q4nkbN/Jo2phiibo/bEAVqyYyOZuxgr8nenuCb3I2qD8/CEfp7MSMI6WJM0dm+2zfxa+kWaVlzvAogv5Dim3x7vxtjiuGFi3781yDReiX9z4tJN8ONQ7YGKjqj8VxK210mQpxHq/nWBwy8iSpNme3mcCjyL6m66pT16xEirZ37rPZXuW9Scb5pxEz8qKoMppghVnU7bAFLl6EGVgRWPSezHEhmX9okB1dIM2zSvVga0uuTKAn3G5EeEyawZZ09t1f6vTcSZbvv1LKhubplJIKhVlD2G8NCzgMPNfHzO0LYEj4FHlub2EiEE7VR4MAokZp7lsfxyGP1LIcb6iTo0mRETMNH+n9ENDcgVhIVUSdin/YNNePzLdd6wdlAU+QFXUg2Q8TVClaJV+OcD18JuIYaU178lM8ghsldLVagvTdTQbo8b+pitQKBRFHhX0QDYr8cHVMjozMrmsy2YubRDelpbwEQmg23UCXZpXydC3gFSqu3nTA6kBvvlDDkO0lhevzbIizL9nmdDZB5mxFmbjqvN/jbiC78hVLPgXFjOdAOxYl8H80Nd3efCWdjGWEEBQkTySlBqigyxD5l5d9bo0hS8YR28Y6FvA+lkm+1cAY+Xox+3me4v5VYnBNFzSIMPN0QCfGBCRGDMkfBxknlmhghH9mHj/xoh17b0e+39o/HxY5qMOmb6xYfGdobFIntAS0un62lDvgxF7sM1zhTLcku8shM8g9UOs0AjEwl6l0ckDyWXDVw1o7LgVRnTUQIPeBYgmaMtU3Tnd7vwSSziiDcTJXpWZjZi3YrucP2XrRbL7tac9YmEqWWX4zHj0D0kLpkJuhZn2xehHWSEIgHd6GVLD/beEwUmEmkojDuI4uDVKaLb5QW6xid1qr7C6Suh3jTqdwRGZ4r+QCZ7i4a+Pq5HRT/rX8MN6e0ow0m4I6uHH6Mnaby+pSpG93v84NnhlSIy3Osvfgl6FWWEn2XJLxActqr6hLSC8DDdmItxL1VtsNueCfOixeI8hkuwUx9TDxTMLJ8zV0Zzndri1ce55Z5VEw7ucmMW7wwYCfivErNiDrt4vdCMEi+QrTNyzOC2Df72Z+osEjuRCOa2NaSIAhKjvU++QNh4Tqz5ZgZxL8G8N5XJefOsX33HaZNAybNjUJ2VeGoe2QxAioiXtwVFsjxfnFPDZXa9oNO82xrwX5QRzJx419qFP491L40ytY0FAxQXS0hVo7foBsEIPgYwiq4Goh4M427Bi79QutnNm7avWEBACKLUySN1/KVPW1KKJe1rjSFrt8ogZsLHFDTCKQLXpwskrR/gtM5r10y7Vdw5x7Eg== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39a96ba1-ef42-4b31-f9c8-08db66430545 X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB6117.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 04:03:44.2753 (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: jDH6XGMradM+Rs29CCEdB8aFrUBM7e6970pwby++fqsgqOPgWnlOX4O1pECEwYdAEp4FAmX/2V+3MTLySsulTfpfrmRA8hGuW0p0/g6AWaE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR04MB5842 X-Spam-Status: No, score=-13.1 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767924631673976985?= X-GMAIL-MSGID: =?utf-8?q?1767924631673976985?= 1. Add -mpdr to some cases. Gas doesn't generate .pdr section for Irix objects by default. See `int mips_flag_pdr` in tc-mips.c. 2. Add irix-no-pdr.d. 3. Add and use call-nonpic-1-irix.d for Irix targets. Gas doesn't set O32 flags for Irix objects in e_flags. See `use_e_mips_abi_o32` in gas/configure.ac. 4. Add mips16-e-irix.d: g1 is marked as O on Irix. The Irix 5 and 6 assemblers set the type of any common symbol and any undefined non-function symbol to STT_OBJECT. See `mips_frob_symbol` in tc-mips.c. --- gas/testsuite/gas/elf/elf.exp | 4 ++ gas/testsuite/gas/mips/call-nonpic-1-irix.d | 30 +++++++++++++ gas/testsuite/gas/mips/elf-rel26.d | 2 +- gas/testsuite/gas/mips/irix-no-pdr.d | 8 ++++ gas/testsuite/gas/mips/mips.exp | 11 ++++- gas/testsuite/gas/mips/mips16-e-irix.d | 50 +++++++++++++++++++++ gas/testsuite/gas/mips/mips16-e.d | 2 +- gas/testsuite/gas/mips/mips16-f.d | 2 +- gas/testsuite/gas/mips/mips16-hilo-match.d | 2 +- 9 files changed, 105 insertions(+), 6 deletions(-) create mode 100644 gas/testsuite/gas/mips/call-nonpic-1-irix.d create mode 100644 gas/testsuite/gas/mips/irix-no-pdr.d create mode 100644 gas/testsuite/gas/mips/mips16-e-irix.d diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp index 4890dd93420..0abe730c375 100644 --- a/gas/testsuite/gas/elf/elf.exp +++ b/gas/testsuite/gas/elf/elf.exp @@ -207,6 +207,10 @@ if { [is_elf_format] } then { riscv*-*-* { set as_flags "$as_flags -march-attr" } + mips*-*-* { + # Irix has no pdr section by default. + set as_flags "$as_flags -mpdr" + } } run_elf_list_test "section2" "$target_machine" "$as_flags" "-s" "" } diff --git a/gas/testsuite/gas/mips/call-nonpic-1-irix.d b/gas/testsuite/gas/mips/call-nonpic-1-irix.d new file mode 100644 index 00000000000..3cff1ca672b --- /dev/null +++ b/gas/testsuite/gas/mips/call-nonpic-1-irix.d @@ -0,0 +1,30 @@ +#as: -mabi=32 -mips2 -call_nonpic +#objdump: -pdr +#source: call-nonpic-1.s + +.* +private flags = 10000004: .* + +MIPS ABI Flags Version: 0 + +ISA: MIPS2 +GPR size: 32 +CPR1 size: 32 +CPR2 size: 0 +FP ABI: Hard float \(double precision\) +ISA Extension: None +ASEs: + None +FLAGS 1: 00000000 +FLAGS 2: 00000000 + + +Disassembly of section \.text: + +0+0 <\.text>: +.* lui t9,0x0 +.*: R_MIPS_HI16 foo +.* addiu t9,t9,0 +.*: R_MIPS_LO16 foo +.* jalr t9 +.* nop diff --git a/gas/testsuite/gas/mips/elf-rel26.d b/gas/testsuite/gas/mips/elf-rel26.d index aeb4e16d178..71fbe83d4b6 100644 --- a/gas/testsuite/gas/mips/elf-rel26.d +++ b/gas/testsuite/gas/mips/elf-rel26.d @@ -1,4 +1,4 @@ -#as: -mips32 -32 -EL -KPIC +#as: -mips32 -32 -EL -KPIC -mpdr #readelf: --relocs #name: MIPS ELF reloc 26 diff --git a/gas/testsuite/gas/mips/irix-no-pdr.d b/gas/testsuite/gas/mips/irix-no-pdr.d new file mode 100644 index 00000000000..7268e020c9f --- /dev/null +++ b/gas/testsuite/gas/mips/irix-no-pdr.d @@ -0,0 +1,8 @@ +#objdump: -rst +#name: Irix has no .pdr section +#as: -32 -mips32 +#source: sync.s + +#failif +.*\.pdr.* +#pass diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 178349ecc03..3ba0af7325f 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -1251,7 +1251,7 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "comdat-reloc" run_dump_test "comdat-reloc-r6" - 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" @@ -1551,7 +1551,8 @@ if { [istarget mips*-*-vxworks*] } { [mips_arch_list_matching mips1 !singlefloat] run_dump_test "mips16-vis-1" - run_dump_test "call-nonpic-1" + # Irix sets use_e_mips_abi_o32=0. See gas/configure.ac. + run_dump_test "call-nonpic-1${imips}" run_dump_test "mips32-sync" run_dump_test_arches "mips32r2-sync" [lsort -dictionary -unique [concat \ [mips_arch_list_matching mips32r2] \ @@ -2169,4 +2170,10 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test "global-local-symtab-sort-n32${tmips}" run_dump_test "global-local-symtab-sort-n64${tmips}" } + + # Gas doesn't generate .pdr section for Irix objects by default. + # See `int mips_flag_pdr` in tc-mips.c. + if [istarget *-*-irix*] { + run_dump_test "irix-no-pdr" + } } 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..1b473deb281 --- /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 -mips32 -mpdr +#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. +# See `mips_frob_symbol` in tc-mips.c. + +# Check MIPS16 reloc processing + +.*: +file format elf.*mips.* + +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 \.L1.*1 +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: + .* diff --git a/gas/testsuite/gas/mips/mips16-e.d b/gas/testsuite/gas/mips/mips16-e.d index d4522d6e7c8..9a7c3e82c0c 100644 --- a/gas/testsuite/gas/mips/mips16-e.d +++ b/gas/testsuite/gas/mips/mips16-e.d @@ -1,6 +1,6 @@ #objdump: -rst --special-syms -mips16 #name: MIPS16 reloc -#as: -32 -mips16 -mips32 +#as: -32 -mips16 -mips32 -mpdr # Check MIPS16 reloc processing diff --git a/gas/testsuite/gas/mips/mips16-f.d b/gas/testsuite/gas/mips/mips16-f.d index 62e30a31840..0ed246cfbba 100644 --- a/gas/testsuite/gas/mips/mips16-f.d +++ b/gas/testsuite/gas/mips/mips16-f.d @@ -1,6 +1,6 @@ #objdump: -rst -mips16 #name: MIPS16 reloc 2 -#as: -32 -mips16 -mips32 +#as: -32 -mips16 -mips32 -mpdr # Check MIPS16 reloc processing diff --git a/gas/testsuite/gas/mips/mips16-hilo-match.d b/gas/testsuite/gas/mips/mips16-hilo-match.d index 76ad7b39cdd..7b42f6946c1 100644 --- a/gas/testsuite/gas/mips/mips16-hilo-match.d +++ b/gas/testsuite/gas/mips/mips16-hilo-match.d @@ -1,5 +1,5 @@ #objdump: -r -#as: -mabi=32 -march=mips1 +#as: -mabi=32 -march=mips1 -mpdr #name: MIPS16 mips16-hilo-match .*: +file format .*mips.*