aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2023-09-06 16:01:34 -0400
committerNelson Chu <nelson@rivosinc.com>2023-12-05 14:42:08 +0800
commitc53b543736cd3b64adb368b0a575241a257cc003 (patch)
treeccc7997e9a4295a397ae43d1202487dde8362345 /binutils/objcopy.c
parent02b8b049a4bf2afb2b74dd4616509eac885b84e0 (diff)
downloadgdb-c53b543736cd3b64adb368b0a575241a257cc003.zip
gdb-c53b543736cd3b64adb368b0a575241a257cc003.tar.gz
gdb-c53b543736cd3b64adb368b0a575241a257cc003.tar.bz2
Handle "efi-app-riscv64" and similar targets in objcopy.
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>
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r--binutils/objcopy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 6bc84bd..b3c8d0f 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;
}