svn commit: r349483 - head/contrib/elftoolchain/libelftc

Mitchell Horne mhorne at FreeBSD.org
Fri Jun 28 00:14:14 UTC 2019


Author: mhorne
Date: Fri Jun 28 00:14:12 2019
New Revision: 349483
URL: https://svnweb.freebsd.org/changeset/base/349483

Log:
  libelftc: add RISC-V bfd targets
  
  This adds the following targets: elf32-riscv, elf64-riscv, elf64-riscv-freebsd
  
  Reviewed by:	emaste, markj, jkoshy at users.sourceforge.net
  Approved by:	markj (mentor)
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D20768

Modified:
  head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3
  head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c

Modified: head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3
==============================================================================
--- head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3	Fri Jun 28 00:10:26 2019	(r349482)
+++ head/contrib/elftoolchain/libelftc/elftc_bfd_find_target.3	Fri Jun 28 00:14:12 2019	(r349483)
@@ -76,6 +76,9 @@ Known descriptor names and their properties include:
 .It Li elf32-powerpc Ta ELF Ta MSB Ta 32
 .It Li elf32-powerpc-freebsd Ta ELF Ta MSB Ta 32
 .It Li elf32-powerpcle Ta ELF Ta LSB Ta 32
+.It Li elf32-riscv Ta ELF Ta LSB Ta 32
+.It Li elf64-riscv Ta ELF Ta LSB Ta 64
+.It Li elf64-riscv-freebsd Ta ELF Ta LSB Ta 64
 .It Li elf32-sh Ta ELF Ta MSB Ta 32
 .It Li elf32-shl Ta ELF Ta LSB Ta 32
 .It Li elf32-sh-nbsd Ta ELF Ta MSB Ta 32

Modified: head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c
==============================================================================
--- head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c	Fri Jun 28 00:10:26 2019	(r349482)
+++ head/contrib/elftoolchain/libelftc/libelftc_bfdtarget.c	Fri Jun 28 00:14:12 2019	(r349483)
@@ -316,6 +316,31 @@ struct _Elftc_Bfd_Target _libelftc_targets[] = {
 	},
 
 	{
+		.bt_name      = "elf32-riscv",
+		.bt_type      = ETF_ELF,
+		.bt_byteorder = ELFDATA2LSB,
+		.bt_elfclass  = ELFCLASS32,
+		.bt_machine   = EM_RISCV,
+	},
+
+	{
+		.bt_name      = "elf64-riscv",
+		.bt_type      = ETF_ELF,
+		.bt_byteorder = ELFDATA2LSB,
+		.bt_elfclass  = ELFCLASS64,
+		.bt_machine   = EM_RISCV,
+	},
+
+	{
+		.bt_name      = "elf64-riscv-freebsd",
+		.bt_type      = ETF_ELF,
+		.bt_byteorder = ELFDATA2MSB,
+		.bt_elfclass  = ELFCLASS64,
+		.bt_machine   = EM_RISCV,
+		.bt_osabi     = ELFOSABI_FREEBSD,
+	},
+
+	{
 		.bt_name      = "elf64-sh64",
 		.bt_type      = ETF_ELF,
 		.bt_byteorder = ELFDATA2MSB,


More information about the svn-src-all mailing list