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: 75397 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 649E33857C45 for ; Wed, 6 Sep 2023 20:02:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 649E33857C45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694030535; 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=kNlw5u2V+/v/ce992evF5a6NEL2J9LYSX9SYMBVs4ynFjWz0OWFua37OS0QYjDHH5 CvwfnmMrI9ZVNoVNGVPnozq8FRLzi9pofOI0ckRw84CifFpvn3N4wXEMLoG7HfNsB7 /bveaiCL8MQsS3qiKC2wnxQVBrKZU+/9XPBnHMCo= 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+patchwork=sourceware.org@sourceware.org Sender: "Binutils" 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; }