From patchwork Fri Jun 16 06:25:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 108863 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1125881vqr; Thu, 15 Jun 2023 23:34:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fD2nfAs+q/rhWr8fHbCVmikKN0dsxTzXAYXCqwNuu5eKeE0p0Ib42lyeHYz7FTgMHheVo X-Received: by 2002:a17:907:7287:b0:96a:ff7f:692 with SMTP id dt7-20020a170907728700b0096aff7f0692mr940702ejc.68.1686897258085; Thu, 15 Jun 2023 23:34:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686897258; cv=pass; d=google.com; s=arc-20160816; b=NquLRoizTG8nYGedioNBkQpyvs3vU0t2GlRxj4hFmlX84v0ep8ItIbULIEas3MJKA7 eGSvuB25VfRYHYXMAnd+GIDBp/0kn7ab7JszYBU6oNoKs1sE57tT9NPZfo+3YcvIvs2z kENViHS1IN+3J9HnoInuzpDZjvlEtP+Sdut0AjlqLBgAQKcXqnUYB2GeGIdTpiy9lF8x 1LD7AFb0PQzEe+g9ChoPAQVgE38eL2T9i/cGozxkH0/o1epUXcDoZsK5SEDTz0D8Ywd1 /lgMcLUML/hgvNMFJ5Jx4yPWEc6LqzKxJ9COKdOh7+1VamOybyMgUqMmi6DuzI89KHv6 cMkQ== 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=bff/4BMpUChOTCVOo68Yk8Di7c43aMGc1+RaX8Zt2UI=; b=eKK7QqR8Xq/1AsnYtqubSv3TKJk2fZu+f4sOcGtoH+V8TI0GT8VQbiLnDDjjFcvjBd PRRHOCiN5fOuQMEPB6dzixeoiKAcXbZjHnjIukIS+jc79dmhstLIkS8DhnF3LxQJ3qhA E2tc29oEUbl8q8oKum/ArG5LVVX/EgwM5hnEYS4dWeNWpARUU4fv8PQAPUfo0ULBIyxs RI/SDYokgD3pJ3z0YLvzp3ycUkK2dzMR/wsWj9lGFBHxgAtEP9sTztTmZ6b/CyUoF8Hd W2+nO7VaE3v/2mlTaoJ6u/SK1UhfFsehyGaLQdhSy6YjXRjalfFgE//m6Lf1MD1/36xR fq3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=xYvkx+rr; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p9-20020a170906140900b00977ead65611si10443334ejc.573.2023.06.15.23.34.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 23:34:18 -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=xYvkx+rr; 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 976213885C1F for ; Fri, 16 Jun 2023 06:29:05 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2107.outbound.protection.outlook.com [40.107.215.107]) by sourceware.org (Postfix) with ESMTPS id 1201D3882039 for ; Fri, 16 Jun 2023 06:26:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1201D3882039 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=QGI6UXsxHer4GJL7hpLOWOOvWrpdSVmTgNofXba1CxfKVGjcuDIF5sLtTmQaEyyf0RbxjxZLIPwWQT7od4kj/WKdy/erpafhvJFaQ+GiuTvN1/rwp9z5b68qOKr59sdKsP+mDf2NfxzoA1NkoQjIfKlRLp9paxHFYVdF08UTiGTAZiYVGwtTrOrUafn6eEovwwzg+zG+5PP5Psp9Pnwk/p4XypX6wlBuOoI/4pqjy3AUwdHK586JxGxY4zrCk8GiNdcIJCj9IoljXuXY/O9rEWELvvZ93qX63XkmhoHRc9+0IkiYWl21paw3eBKIAx8gHVKrTI5k+7RwA5gyY5o/Cg== 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=bff/4BMpUChOTCVOo68Yk8Di7c43aMGc1+RaX8Zt2UI=; b=GBcPRX3CVDCL1Q+VZwvstEZmYS1AscTyOA+cEtfmezbp0BUtVNwGSD7xDujmW8C+7fbgVBgU6/Fo8spACCTgWffFJFOF4rz/s3jeyWaWXFPwVhKqUdukdtkPq5O8gh/Vdk33UygSZh85oGiKKzF7uOVafnDnbb7H2FIe3qVJz5yp8P8CYz9LFH/IumFNTnaL2GTfNS21chaVV6ZWoBlBbx2vOJDEIVFcJ1aXqQE8RFwyQLCydIWIbpqK2NJ69cyAWRhyM5l36JIYdXsUA2sTMCYBIu/NFirJE+ENZjjjHzEDFr6lp2qr/BuVg5FBFYo0RuD1mgP0InuezO80BaY9Uw== 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=bff/4BMpUChOTCVOo68Yk8Di7c43aMGc1+RaX8Zt2UI=; b=xYvkx+rrhZcTpiprUt304+kbzWHY+CjEhFTxtaVsW93e9T5Mmo27iYs1QPuKNyeCxi9289tK6xkoZ6dH9bTF8i5Vm1zo7p+jTmaMncIU0cYKKB1wBf6go+ye7IbyQtbDZgK3vlLof4lEQTrKQFiu0fiX1J2tIFQq3SS2TUelSCc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cipunited.com; Received: from SEZPR04MB6121.apcprd04.prod.outlook.com (2603:1096:101:98::10) by TYUPR04MB6911.apcprd04.prod.outlook.com (2603:1096:400:350::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.44; Fri, 16 Jun 2023 06:25:58 +0000 Received: from SEZPR04MB6121.apcprd04.prod.outlook.com ([fe80::8969:4dde:3fc5:33c9]) by SEZPR04MB6121.apcprd04.prod.outlook.com ([fe80::8969:4dde:3fc5:33c9%4]) with mapi id 15.20.6500.026; Fri, 16 Jun 2023 06:25:58 +0000 From: YunQiang Su To: binutils@sourceware.org Cc: macro@orcam.me.uk, paul.hua.gm@gmail.com, amodra@gmail.com, jbeulich@suse.com, YunQiang Su Subject: [PATCH v3 7/7] MIPS: Fix Irix gas testcases Date: Fri, 16 Jun 2023 14:25:04 +0800 Message-Id: <20230616062504.1713904-12-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230616062504.1713904-1-yunqiang.su@cipunited.com> References: <20230616062504.1713904-1-yunqiang.su@cipunited.com> X-ClientProxiedBy: SGXP274CA0023.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::35) To SEZPR04MB6121.apcprd04.prod.outlook.com (2603:1096:101:98::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR04MB6121:EE_|TYUPR04MB6911:EE_ X-MS-Office365-Filtering-Correlation-Id: 617d40c0-e007-4a00-1956-08db6e328beb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JzY/srAxdkUwlwt52S0v06+rGbo5hUrpQ0WN6xVBtN2yWtDlxmi9aR5D9vJVd5z//apztnojFW9ygybAfLpNIZFxLAMg6eL3PzVlqUEmYRr3rKAltmpXZzpQwj4aAg+0aH2dtYB2H77w5zXXH0N2ZltfPPcKfzHalAoUjzMee0A4feGLMHTx9W0//osLqWw4VSJZ2whmYvNyHJAr574vSgpJxIP0Dz38IKkw/7FuIFZwJaNjNS7MBtOX1KyzE1qFykecDfWaz/VRuWRKmozw+dFF7gnLtyUsZQmDAZp3zxJumj4eItj1+LWyI7B/UG9fDIc3bjX1vuIyg11fhN9Ow2722Dnf4Pk8CrLpFJ0CwW59kZZKVNQEQnfwC7W1ob/XMKzyl0thBXUPL9Ri/USt2WWUXhBsUADjiwrXVg/vDISPvbzciipD3mbk/ZBKlYjlfPcg0sNT0B7MNOIJ534di4BBi+bnFEdHohfQdN2J1sePYkspyO4ALwW1bRfwq+yxVFEGjeWU71d0FwIEMkV2JAYI1OuyW8p2oxQ6Jzz5kxnGU5a7UiptN07Ua+5pVo2feTadgG1nTxk6ilmwT9+EqB0yOyKPwBD9J12PeY5QoMA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SEZPR04MB6121.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(396003)(39830400003)(366004)(346002)(376002)(451199021)(36756003)(186003)(2906002)(83380400001)(26005)(1076003)(6512007)(6506007)(66946007)(52116002)(41300700001)(6486002)(107886003)(316002)(8676002)(8936002)(5660300002)(86362001)(66476007)(2616005)(66556008)(4326008)(6916009)(38350700002)(38100700002)(478600001)(6666004); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qlWlAFibqXINRcVlyF1YHAmvZKzU1X6vZc6pxsKnwlDrxbLykBwqLm1TrRWPsJHI+Ni3KZpQ4Qs8Gmz4y9+lChXTVUgEjXgqB/oAadGSsaJNzyHjRR7qkTbfU0WKkdPWWoDMNxqXvzqKzccm9eyoAUXFv+I30WCugEUkF16SoJxk+f9vTt+Ug+83KpJWmq6NpBerGM19TNQYe3X2+hnuNP8IMtif8nFB4kpdkArrE+bvud95RxAE9X/6Li9YRezlmBhyEMXLvBJa/Z3Fzy0OIiH9BrGZe0JU0pQhWBVw1S/5K+DGSoIHm4ivFfO/zU8ejxZUt+0PMfol5xLa8RzZ3opYHV+MjH3ZR5RYMwp3EQMMhNAMvJkV4Y2h/9drKGCPGodGWAdkBztvWSGxqvu9qo5rPRPhNOUEmdtC7BsMkoE53hTggusMnna4NUfem91GFdjNZ9Q+rTC0P7PCfE+0T/48ZWxR1NIJ2AssYWxL/5IuD3yq6SNNtCp1TOfHlgPMobgejM/Snw9ZqxhEQG3RIcxpq36xLUY8V+YHwADUAS3WVknQn+gNASRokMYO6Ylxb+LU4V+lhuQYIzWv0eMSuyj9Vsi1BwDHanfQk77w0B54Ni1s9TNpUjK2eveb33tPkZqqwI6CIVKBZVPvS40TYKhf3vgM7q0vda3oRat/D1RwpjvCQ+dU+Lf62e0rHgWI+JCHbD3k2IaOld/ascFwApjenWLy3FaRQLBT3X36waD9xOqN92XY5etHgr0ComcDc6XZhroBrNewNoVe+VWCnw5IYcUtqt2m8+AQkdk4vya2p8Ty3Bd7UaX0efepDp6EsNpVAgC/J2y8TpdyF6EMrWpa7Iso5tpQXIsvwiihj4eio8l7KLcYMjlUIGMOknGWQUBK+FPr+cr/3vnYSDCOBk7Ekr0rdqeV9Pn2jIBzGoP9NL2O6T+M8HVhqyVuj/H/kliZTp7TIWy8sDh44JlloVRaesyaAnemPWD5ccIQtWXLTyh7ywOlp+coBV9GFPdT3UOGm+9mb/6FBC4GWqwtXh/Jlv9xgwtjYNfYLT9Tw3Q7TosHVjUE3WwWIUVHWAZimXWXHYhHNkNDjfnDK9TvvnrDqfmsjRcYUn2ot7EX48QZ4/6p/66OpSxxJoKU75i78m3Fl6D9HWguFcnG9Z2L86MUrkwWrrPI1c4eK9FX5fzYXe831tScCGaZMy21gY4t91BcA/WR0U+kicq+Zsng26zHHoL06B8YmWw1opACAYKUWzz10ot2wO4po3ZuPc/xn+ErTVZNdNjfRiCZxuLSWLTmsa+wKIPbIBzVvLnnnIK9j9Oor5xQPKrqP1r+9IZfHukPaP2DJoCYZzgfI3zL1GK49KY0CJSURdF6vVDKSNSFAQSGnkSTcvxyo3QV4zcPD9zG22oEtKHlPBnWDhMaPVOmbABlbBpcbPD/Eeus4fuZjVdmpb3Ka1q1cJUFC9s7bpS8r6hHSUw43Bp+RQz5Mr6u53S/1EeZ0HdX4WiQuaS3rtlFm1A8h86R9ukZMad1ld1pBlV5z/tcVVknAjcf4W5dBwfpW6Em+U7r5q2N2u8as3hboU4+p/n8rsg0IyzJeUGFOxd6LkLeP+FOMwl9+w== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: 617d40c0-e007-4a00-1956-08db6e328beb X-MS-Exchange-CrossTenant-AuthSource: SEZPR04MB6121.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 06:25:57.9699 (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: 1UYH/YKrUtPz8AU87+3cwfEPV1TwmFeX8aQ86ruj7HKizQlwVkelPMFiDLjVB10kdPmC7k2lScp4+0ogxlhsTxBjNVBuuVMLsBDa34Gpnso= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR04MB6911 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?1768839979497322468?= X-GMAIL-MSGID: =?utf-8?q?1768839979497322468?= 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 4bfb350beb9..336eb6afbde 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -1254,7 +1254,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" @@ -1553,7 +1553,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] \ @@ -2187,4 +2188,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.*