From 2dd706b9c41ec78d5c1f99aba52856dbaa2265c8 Mon Sep 17 00:00:00 2001 From: Joseph Koshy Date: Tue, 31 Dec 2024 17:53:16 +0000 Subject: [PATCH] libelftc: Fix a typo - FreeBSD's riscv port is little-endian. This change brings the descriptor for target "elf64-riscv-freebsd" in line with its documentation. I missed this somehow when reviewing https://reviews.freebsd.org/D20768. Reported by: Haowu Ge (on elftoolchain-developers) Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D48271 (cherry picked from commit aac74b708b3dc49466b0fb5365bc2923b7727a1c) --- contrib/elftoolchain/libelftc/libelftc_bfdtarget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c b/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c index 5bbf89ba78f..3f2c2370854 100644 --- a/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c +++ b/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c @@ -334,7 +334,7 @@ struct _Elftc_Bfd_Target _libelftc_targets[] = { { .bt_name = "elf64-riscv-freebsd", .bt_type = ETF_ELF, - .bt_byteorder = ELFDATA2MSB, + .bt_byteorder = ELFDATA2LSB, .bt_elfclass = ELFCLASS64, .bt_machine = EM_RISCV, .bt_osabi = ELFOSABI_FREEBSD,