From patchwork Thu Jun 1 00:28:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 101625 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp796382rwl; Wed, 31 May 2023 17:29:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6WtcFAHPz/bfeaom3Q/s2P+R4ddA26Yu0rhmWN6bihusG87EcnRlsilI2Suhnc7Br7+qaX X-Received: by 2002:aa7:c45a:0:b0:50b:c085:1991 with SMTP id n26-20020aa7c45a000000b0050bc0851991mr5382667edr.19.1685579345097; Wed, 31 May 2023 17:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685579345; cv=none; d=google.com; s=arc-20160816; b=HpXjsM9aI7nLAjuLZdMjGM/ECiJHqefhejniGOrK+8btkB/aRtm/dUj1au3NvIzyKu BAQrIritDdzgPTcL2HqkA62YbDFkmpAsUMRTOL/W3VtrPlOhr0DJ+RZWyYEpnDx9C58e w8FQxrMXdzPxTc+UqQbaKI/z39wSJtt5zp61Q3dOiibulatltyObtOf0ZIFPFTtKKCeR /tY19gMpUXt4nfnOAVYFek4Hb+iIh1Nt0SNP+61Q6PgCrIJfuFz6Hjvo6TzVDT01k0S+ eyPScOnXzMTgPwEvyGMZ93X1wVyxQUbUw8YQ9AXZ6P+RiHzsOvSocyk0Vn+cGqoqf1y3 gjjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=Ntra9mjGamZsfg7TdP+fkVB/+Jf2hldACLvHdxSUlBA=; b=U++TVVReuR/qR5RiioFU3dQlSx4llDCK1NkcaU9DXZXE8JGy7eac95emHgL4TEYONd CLuzghht+1mC1ejQmlvLEbhvXe+zLzQfn+FnxLcJ97NTL7pWdEe7R6KQakd808VcVwbT PmPfgqVQLIMN2uVSny84/iJ0JknYldAbWkCIsje0qMNW2PQYInu2nfeCjVYO9+Zr5Y/e TJMWr+lDEm/LAIvE2H4R2plejaVfkfoWYO/BYtV0bwrcgvTuj6fEvrNdUa3EOb7sM80e jJrNbIGYX3tWPpiw4D8VJDKH5Agv/s1w6+rNp4H1PIKwfQpqOFrXygi8jCydPdnsOK9v iMiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=cG4jCfZ6; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id d24-20020a05640208d800b00514b8d2b1e2si2242280edz.260.2023.05.31.17.29.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 17:29:05 -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=@sourceware.org header.s=default header.b=cG4jCfZ6; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F254F3858039 for ; Thu, 1 Jun 2023 00:29:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F254F3858039 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685579344; bh=Ntra9mjGamZsfg7TdP+fkVB/+Jf2hldACLvHdxSUlBA=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=cG4jCfZ6egMSDtiK0b9SNlHcmHE7J/cEZOH/EUGqmwibDJvCqVB/ZfxFOxKBGrWHg JkN7Tof+ok5w8dQWpoyTUijriRcSPjVFornTCW9NB1TjVCakHHXMDe7kQ4vrZlJ05v r6cjy3d2s3hFMZrzcJavgRqk/m2vM4GJKMlDCrPY= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 2825A3858D20 for ; Thu, 1 Jun 2023 00:28:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2825A3858D20 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-64d2f99c8c3so235825b3a.0 for ; Wed, 31 May 2023 17:28:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685579334; x=1688171334; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ntra9mjGamZsfg7TdP+fkVB/+Jf2hldACLvHdxSUlBA=; b=aB5mYe7duQgon1ipwBYxdrEQwD2xtGAKqUZ48tii2rR1FcHp/vpMOQocViAkRFeTR6 xP50ss8qNrx9y0nB/dccRBwbWysHx005MEBXSUYEutJ4SYSnddF5pLkHEFbj8O5oY9Hf XsyMNQWPxiVo+X4SBVMgdYomyzXv08Ek+iP2cz+YZgpFpm9m2OCFIkO1VVYkDZ++FOEo qb7B8ViEXMYYhXyEnlqrwXqBu/REFNIZ6UyCNQzWSB2RZUBjlDoUTw6diUj5FCGctyfD fNUVLRJA2Mmlr+guA2lolUvAV6WuD//l8dwTodv/X76ifyMMO5Jzr3q7LRQnEsiddyas tVbQ== X-Gm-Message-State: AC+VfDzh9TzNqCm1iPqWezYNZ8O9j+Z8+nrqKyk+zjFamZ8Kv4YT8PdC pAd812fZPV/oQEJ0EsMN7B21jvtqO78= X-Received: by 2002:a05:6a00:b96:b0:647:b6c9:179d with SMTP id g22-20020a056a000b9600b00647b6c9179dmr8188770pfj.21.1685579333629; Wed, 31 May 2023 17:28:53 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:a6ee:d9ea:e91a:eec4]) by smtp.gmail.com with ESMTPSA id j17-20020aa79291000000b00640dbbd7830sm4021492pfa.18.2023.05.31.17.28.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 17:28:52 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 07C5811407E4; Thu, 1 Jun 2023 09:58:50 +0930 (ACST) Date: Thu, 1 Jun 2023 09:58:50 +0930 To: binutils@sourceware.org Subject: Remove BFD_FAIL in cpu-sh.c Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3034.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra 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?1767458047194295509?= X-GMAIL-MSGID: =?utf-8?q?1767458047194295509?= The assertions in cpu-sh.c can be triggered by passing bogus values in disassemble_info.mach. This doesn't cause any bfd misbehaviour. * cpu-sh.c (sh_get_arch_from_bfd_mach): Remove BFD_FAIL. (sh_get_arch_up_from_bfd_mach): Likewise. diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c index afea21a8dac..578ff086c3f 100644 --- a/bfd/cpu-sh.c +++ b/bfd/cpu-sh.c @@ -117,9 +117,6 @@ sh_get_arch_from_bfd_mach (unsigned long mach) else i++; - /* Machine not found. */ - BFD_FAIL(); - return SH_ARCH_UNKNOWN_ARCH; } @@ -139,9 +136,6 @@ sh_get_arch_up_from_bfd_mach (unsigned long mach) else i++; - /* Machine not found. */ - BFD_FAIL(); - return SH_ARCH_UNKNOWN_ARCH; }