From patchwork Fri Jun 16 06:34:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 108877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1128242vqr; Thu, 15 Jun 2023 23:40:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+J083NSBfzwxdhSuLpxRWW7FMLiFVwbFIkZHUb+RHnTxxsnsum254E5GYGBEOj9P8UAYZ X-Received: by 2002:a17:907:7ba5:b0:982:9b01:a57c with SMTP id ne37-20020a1709077ba500b009829b01a57cmr1083014ejc.12.1686897655801; Thu, 15 Jun 2023 23:40:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686897655; cv=pass; d=google.com; s=arc-20160816; b=qxFeUqW8KyGGHbzoPoIEOi12SDSepYQBztlBd3pZCDhpfd+0tEQgkQXPZVPt506VrR AmKviw2w6EPa7fUlUqr383F4r2BUdRTwGbV1IDIRnngTL6RcDfOtMR0EZ32Q6kzd2dIJ fmvYAnpit8LTqfEYNnU53+Qi+a7YVwF5EQ+vlP5DzpcsLykmjCozwBhgLsavi3VEyZ4m /+flOfN+8VlQCjQuKdo/elszObqeNHrIBqNTQjQ3MZIn4pseVCOnjKkO+w+yA6yBfSpO eXmwJNPEdxDF+MgWbR84Kk9r5easQtqZc3kDWfayVcgkyxNsAQTYf9iVtUNVb1CPHP/4 KOrg== 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=LIWdHtwpcF7jbx0RwgVHTNDp/84RVM/DXGDVuB2E+pv8eCNVhiadBGaM2Awthowexs kz8TtamGm6GJ0oW6zE0JrHif2PZ4xxdnp0mLOLE23upR0AhVLFRGMGRHB/velbGS5jwB TFssg4ObOvUKUmQ/zenyBI29Vg0s30g5ufV+SVo/nFv4Y0fuWz6d76A4a9ak3Vcjkxg9 J7sIdxeSwI7UZ9zH6+dbhuKn4ZG1tWnw700Q7HfNaAJPp13W7aKrzbrIRrkUHxcrV7la f9l8MCi7hGjP3MAjIVRiO8lqEHbr4aPAihyE0emhaJH3ahsbIKthComkRptNpmUnaLTq 2JSQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=H8HAzonB; 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 a6-20020a1709063a4600b0098638cd77b2si458337ejf.199.2023.06.15.23.40.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jun 2023 23:40:55 -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=H8HAzonB; 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 6E44B3836E82 for ; Fri, 16 Jun 2023 06:36:03 +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 A32F03894C05 for ; Fri, 16 Jun 2023 06:35:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A32F03894C05 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=Mwt0YU92Gi6ojgcuvn68Cwfl6Hj2AwjJKxng7TC19wbAbmB9G05GUkrgP/KNytYySR1mUt7nXDJPAiK0NXRytFFoQyR2V3v6wNmDN/BnSp4Tl4ghMleRqgvP0gW/i35GNY/6mcMvOcil3Qlq2pcpGPtImaxbzd0V3us18sMeldZfGq268LPvueB8wF+ToPGE9EJH7v2dF55sf7zW6A9Lh1xYX7K1kEhf/SL9cfxSpWRGn0G6P+RvZDYApipYN/VLdZw1VlHm1Gh6jzCK95bgPOsk6AHJ/sesBis9bO8GmMsv8qE2bS5A38coIjFst/BoLNuDg+C3s9GHC9s7Iabazg== 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=TfPdCIH45xQXnwCBXz52krxUw2EufEDHcL0jWNxHRjLS0OuDTVjzOX0iLrParvxtAtp+nB8xIzF1vDh2ZG0YHmCZSkjgBRpoiu20zF1deybQszPF3lxsYw7t4SofOSAFjCdzZHTEBtmZ7xYcoZy2x58DRgvYzZTCunuOAmeIqRAqa4eYr8o+Qi36srDiSCoorK0Kyi3P0k0/vNPDOFkc3aIHlsluwwGgBGwEhs88nxuN4JiqcDdxJbFbKPoQCepXnV7UkUAvuARE/ZV/zr8wd81pr1z7RKIbTu6hnb/8fnYhItBhK9UctuJG+aUqfE2q7Xb5Qn1O14QHAwH0DPKs6Q== 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=H8HAzonByr2uKxqnWZ6ZnRSrXxXpHk3jnPHMAp7L1R2D1FEgyuEoCVzxweKMvjfvvomsMdEYEOybRcVSormpnE6bdJbEe0w42CdleT0co4q7xYgZXO7GYn92m27aKOAPBDHg6JC2KxiBgIrF1fzgM2edGr8x8La7O1LeYanCCQw= 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:34: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:34: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 v4 7/7] MIPS: Fix Irix gas testcases Date: Fri, 16 Jun 2023 14:34:12 +0800 Message-Id: <20230616063412.1715024-8-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230616063412.1715024-1-yunqiang.su@cipunited.com> References: <20230616063412.1715024-1-yunqiang.su@cipunited.com> X-ClientProxiedBy: SI2PR01CA0014.apcprd01.prod.exchangelabs.com (2603:1096:4:191::17) 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: 8f93e940-5556-4235-d9c9-08db6e33ce1f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NyxbET+CB8YIsfZURHQwOQnTSSHKETWN7o24ydQMy1tc6jpaedv7m2QQcoE6Dh+Hk1cx6tGdWGOic0kL8953qqPkHVQlea5m9YKUzNV4uJkMyFd+ZvD5ltwFxBAFzhER7dzXtyTMh9Q4S/SiUrRMZuCeVlkaQ4KKXwZ9covOxbVuZEOKLeKOjRz+lCAimuElYeZKOUupL1vZzqgvZqWL/n9BHHYEsh+tdVfwqj8fdPBWVBkVj1T7nRglS1F0Ug6kKIThZHSq0K/JMdTjX21/l6J4kZMDI3QrhIF1LXgHF9G1OBcVTzQ+l+uTTrz2zOONekRfM+TItJ7ZaJyCmB4iMBJx7I2NxFA3LTuFMdT5y9isLfLhJWcvLMBMhlMQLFehJocqn3etRDSrxJBoFByVOL9dwpm0jyFrBChnv65B8hELZxStc7nii86IGUtaYrUjwhbSVEHDv6mMDufx3AIYHk9fZkMb/N/dQcrTfilKT3id6RhFA518EMUrSnF4ft29U7VUMreQFjAlgGisp6vycwQF555uSF8T7SZ8UWrJo0mTovkNGcE4YNEt6en1PsFpNhO5MvOBM0xG42pUJ93LuIf7eQmJOnL+TsUD4MVlS0E= 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: Ijx7MbPxExneQoNikDXEg6JZjjdYGWiawIzEHuQps5ut1zo1ci6ZNLh/ctsqM2WkbprXYj4cK2YmRn7ZJ2EwXclPhw/+xI7TWEdLdX/KW9hyA95Zw9KobANffAXcHAxDmA+D9UhWQGTW3tvqfiPmKCBNZzbp3Zwa8oy/io8k6atgpYmxIthmfq5ERTdCYQWvigV96aVCzP9jEmX19RVDCbq6zpMu7jsZLsfcnusHvWQLD3Rk+M69LxqGeSXOtQiZ/DfdKgP8Vsm3sagoWzWFtthcIWFZTTWd2FqTKF8t6wyIew0qYpuwZAEKrjAryTXvncqO+3wKp0BpqZ4GYcKsVz4xBuIOv/5GaoWdMBR5XdESvFEkjLxsd0cTlUUzjtKiTp3U1JxkqZYDw56uRlo+htlVlYEypCBvG+em1nQ3386eY0iRHaMNeyzfCGakJFlSNIKOeLlvmudj/HobcaDZsMVf8xHXG/9JLvaC6Fy3ZP9LoEwH+owDIXhGfUw9HimnQaTeXsqucjSx7K0gUAL5fmlpuGZh/M7q1Epa9RTKYGc9Q2LIhRbUus/23pguDyXPBoUwbM+PlAzvTeE9V7Y8wNHFAsRp57r+rBk7W1jsgN7y01A9F+gMbENBGHOM9El7V4BaNBtNA5BrEyKk/EH5IN61CqtU3Okk7MR02g7q7McBc6/T3J4cwe0oYZlJ/QdcSMMAJPbzsRQPRYvY92yAR/8BwGjdoaptt6zzXc6/rd0+Uua/hEz6D2ToqpjjdS/rFRWmLIvA+vvF81sdDm923vCfZZUPcrGBqzlVpRRj04VTw7EgUGqLgf5R2WniRiF3/7tWJLdzrIcjx5wr1/IaAuwDMFPdkk1s/66oF1UOfgnFYhtDDAlTq34QoBWobrejhzHbqg4P/H79IJK/HXaPFNMc3EB5KdGdBlNtUwLI5pDJ7UtS8prhN4AgwFbOnnYzhCNDvCcHf5n6/U8mXOEk9iKSOaJ0tu6WjISRAPcSyVOJavVAEJm6irvRWhlIHCt+IrMeuvd/l2+bM9sxkncTHAxUz5CJkYtlxC37mRdWlyh0AHfdpQesiiT4BmP4CmZO2AJIsf0xkXGEyfEkpPlfh9dnGgRGRbIRtZTSpu+eyLuUNh0GQXtSRnXHMDNNc6Xklby6S3VuKrcnTj8+fsAC6ImK5zz7m5fxuo3SsYBGGEYJrZfR7J90gP1b/Nw6Ug0aRGL/hVWWZKdeOIvBMVZIdUyEgHPAlF2IK40vjkrIPlMLnTVs8ZfOS7Ajg13uosXGyuAQsPmxmk3/3cdGS8lWmcnd6TXu9lz0CvoWTUlMM/BXaVIIhotlGQlqkkDMx9PJ0x2i2ynHdLwLbUHffmhLNp+B0xe/1nEQ0R4sOkq08PC2/X8QBN/IL6G4DpsWCla9WWVadFTzyCl46EYFNKuodLB/ncSevj865DNJJRxNJ5+Tx/W9L9qnuzvNXGIxNssVzJB1S3kGShyY984azAWx7dhjOS3BIx1H5240CwI2Iub+Sbx1xUpA3G1PJfjFBUM1A8plcaBcnpcxZBAF0QCxjqkiqGGNwFsAtzDC5y/WRNG4397v+vnA746ohzg7E988HyPzHoH/dsLzKY99cWhxwA== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f93e940-5556-4235-d9c9-08db6e33ce1f 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:34:58.5432 (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: MGDjsJs6nwukwhIIxaW6VyAbq+68KxaD0xoZ4Z9eU/zGtN1Z4l+IcbGE+hzXhh7/PiNxzoV6XOYs9PmJE1VJ+surELiZ71ejuJ6kcpXCYfQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR04MB6911 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 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?1768840396316507350?= X-GMAIL-MSGID: =?utf-8?q?1768840396316507350?= 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.*