Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jun 2019 09:45:09 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mitchell Horne <mhorne@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r349482 - in head/contrib/elftoolchain: common readelf
Message-ID:  <b979b5bb-6896-18e4-881e-32c3f55ed207@FreeBSD.org>
In-Reply-To: <201906280010.x5S0ARLh056619@repo.freebsd.org>
References:  <201906280010.x5S0ARLh056619@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/27/19 5:10 PM, Mitchell Horne wrote:
> Author: mhorne
> Date: Fri Jun 28 00:10:26 2019
> New Revision: 349482
> URL: https://svnweb.freebsd.org/changeset/base/349482
> 
> Log:
>   readelf: Add support for RISC-V specific e_flags
>   
>   Reviewed by:	markj
>   Approved by:	markj (mentor)
>   MFC after:	3 days
>   Differential Revision:	https://reviews.freebsd.org/D20767
> 
> Modified:
>   head/contrib/elftoolchain/common/elfdefinitions.h
>   head/contrib/elftoolchain/readelf/readelf.c
> 
> Modified: head/contrib/elftoolchain/common/elfdefinitions.h
> ==============================================================================
> --- head/contrib/elftoolchain/common/elfdefinitions.h	Fri Jun 28 00:03:29 2019	(r349481)
> +++ head/contrib/elftoolchain/common/elfdefinitions.h	Fri Jun 28 00:10:26 2019	(r349482)
> @@ -426,6 +426,22 @@ _ELF_DEFINE_EF(EF_PPC_RELOCATABLE,  0x00010000UL,			\
>  	"-mrelocatable flag")						\
>  _ELF_DEFINE_EF(EF_PPC_RELOCATABLE_LIB, 0x00008000UL,			\
>  	"-mrelocatable-lib flag")					\
> +_ELF_DEFINE_EF(EF_RISCV_RVE,	    0x00000008UL,			\
> +	"Compressed instruction ABI")					\

I don't think this description for RVE is quite right.  RVE is for RV32E which
is not using compressed ('C') instructions, but using a smaller register file
(16 GPRs instead of 32) which is in theory intended for embedded / microprocessor
variants.  The riscv-elf-psabi-doc describes it as:

EF_RISCV_RVE (0x0008): This bit is set when the binary targets the E ABI.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b979b5bb-6896-18e4-881e-32c3f55ed207>