]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Handle "efi-app-riscv64" and similar targets in objcopy.
authorPeter Jones <pjones@redhat.com>
Wed, 6 Sep 2023 20:01:34 +0000 (16:01 -0400)
committerNelson Chu <nelson@rivosinc.com>
Tue, 5 Dec 2023 06:42:08 +0000 (14:42 +0800)
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 <pjones@redhat.com>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
binutils/objcopy.c

index 6bc84bd9e844ad75347a78633a28e88361b11b24..b3c8d0f81ac829605f379baf134c3a2f98a3bcbb 100644 (file)
@@ -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;
 }