From patchwork Wed Sep 6 20:01:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Jones X-Patchwork-Id: 137597 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp2540249vqo; Wed, 6 Sep 2023 13:01:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRqKOt/l5eOYLUfL/gN6EBMhaGc4CszJ0KsBB1ro7drf8MRXJGX7iaSpVbpvKGDfJR0XvW X-Received: by 2002:a17:906:8449:b0:9a1:bd82:de35 with SMTP id e9-20020a170906844900b009a1bd82de35mr3099422ejy.3.1694030519575; Wed, 06 Sep 2023 13:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694030519; cv=none; d=google.com; s=arc-20160816; b=XC3IkAd8+6JR39P+VzYsyURJdSKxJnPXLbwcuNZq4aDUM5K1E15haFE9ZSop5a5LZ5 ef8a8eoDZeFJzwfidmVxLcvAxbnNgGjKC+9yPeCHSlr7PvIbVWOa8c+Taza8QEFukuhU syrAooyWJXKS8HzGncrnzIH9ILF9zbYl+d8IjH2g/6K+Ouh+84PbsEdi3ib65DsatHkB sCJuIkGSkf8TGjKnoRIsMPny5AkZwmF0iMIepT1V0IssdxXA4jovL0L/Pb7YVkNPhBGc CLNMHyVaj3AcaffXdEsUvZidzVcX3K+Bx+p1uGVreB6d+OANL+dIH34C8fPn2e45unz1 ScBw== 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-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=jvLjNnV7AzfJAcd/bs/rtyoRfmvogvpxVCIo7lG5Rok=; fh=YrdXmpopxZ5NKs5tFxP4YJ+5+BNMZloeVMkeo647vjg=; b=Lk1PzQThxu2z1EXFzGPDs9Zq3n05nJ5tdNCgpjOgSMfsjgbip5YlXlADl66MG61G9H tgibduQaaYFVmwI+e/2uZB7xAyxzROZxdA/wTM51u488TEAjZxc1m61zythOqw1fnG16 2NsBW14yU0UFpREvKGo/7NN5lxTk0PL6GjbPPTGZAzMx6iq7GMu+sxb+2eFnGFWCP4l0 f3tcuDVzvhlc/Hj7QrZNn/zAYTSq+dJvusaX4RbHnl63xcqqDmL7S9AFMx4LQbWajAjo mjxm1NC+y13/9fX+9+sQ+gdjUsSiQgKAuPjHJP2moT9JW2JXRZ6/AO9W0U/sgeP0sWAD 5myg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=molzJvht; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id j26-20020a1709064b5a00b009886c3287e0si10167808ejv.536.2023.09.06.13.01.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 13:01:59 -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=molzJvht; 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 22368385800C for ; Wed, 6 Sep 2023 20:01:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22368385800C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694030516; bh=jvLjNnV7AzfJAcd/bs/rtyoRfmvogvpxVCIo7lG5Rok=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=molzJvhtgblHfKTgxB+WhinOT95F78Uuj7a35qgVaaqg0cWGfgYb9nOLcN+XnHrg8 uDAYt7yjSgfvzBAY8OtiCdBqVf/qrTLhejYsSb9r+6n6pNTVw/A+zo+MkjCRd3hyij k6IxcumrBeZ2+Wg5iBJlGH7hu9iav01j5DHjuIpo= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id DEA6C3858C78 for ; Wed, 6 Sep 2023 20:01:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DEA6C3858C78 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-3rJuMiuCNymglmIGL6MHIQ-1; Wed, 06 Sep 2023 16:01:46 -0400 X-MC-Unique: 3rJuMiuCNymglmIGL6MHIQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DE3B488DF6C; Wed, 6 Sep 2023 20:01:45 +0000 (UTC) Received: from random.internal.datastacks.com (unknown [10.2.16.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E749412F2CD; Wed, 6 Sep 2023 20:01:45 +0000 (UTC) To: binutils@sourceware.org Cc: Andreas Schwab , Peter Jones Subject: [PATCH] Handle "efi-app-riscv64" and similar targets in objcopy. Date: Wed, 6 Sep 2023 16:01:34 -0400 Message-Id: <20230906200134.1033297-2-pjones@redhat.com> In-Reply-To: <20230906200134.1033297-1-pjones@redhat.com> References: <20230906200134.1033297-1-pjones@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: , X-Patchwork-Original-From: Peter Jones via Binutils From: Peter Jones Reply-To: Peter Jones Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776319746157071945 X-GMAIL-MSGID: 1776319746157071945 This adds the efi target name handling for riscv64 to objcopy. binutils: * binutils/objcopy.c: add riscv64 handling to convert_efi_target() Signed-off-by: Peter Jones Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt --- binutils/objcopy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 2ce1b07bf7c..b64cbee3dd7 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -5129,6 +5129,11 @@ convert_efi_target (char **targ) /* Change aarch64 to aarch64-little. */ memcpy (pei + 4 + sizeof ("aarch64") - 1, "-little", sizeof ("-little")); } + else if (strcmp (efi + 4, "riscv64") == 0) + { + /* Change riscv64 to riscv64-little. */ + memcpy (pei + 4 + sizeof ("riscv64") - 1, "-little", sizeof ("-little")); + } *targ = pei; return subsys; }