[PATCH 6/8] bfd/binutils: add support for RISC-V CSRs in core files

Jim Wilson jimw@sifive.com
Wed Dec 2 23:50:58 GMT 2020


On Wed, Dec 2, 2020 at 9:39 AM Andrew Burgess <andrew.burgess@embecosm.com>
wrote:

> diff --git a/include/elf/common.h b/include/elf/common.h
> index 1dbf0b11983..54d5d989a39 100644
> --- a/include/elf/common.h
> +++ b/include/elf/common.h
> @@ -663,6 +663,8 @@
>                                         /*   note name must be "LINUX".  */
>  #define NT_ARC_V2      0x600           /* ARC HS accumulator/extra
> registers.  */
>                                         /*   note name must be "LINUX".  */
> +#define NT_RISCV_CSR    0x501           /* RISC-V Control and Status
> Registers */
> +                                        /*   note name must be "CORE".  */
>  #define NT_SIGINFO     0x53494749      /* Fields of siginfo_t.  */
>  #define NT_FILE                0x46494c45      /* Description of mapped
> files.  */
>

Odd that the 0x5XX numbering was skipped for ARC, though I don't see any
reason for it, so it appears OK to use for RISC-V.  I would suggest keeping
them in numerical order to make the file easier to read, so if you want to
use 0x501 put it before the ARC entry.

Otherwise, this looks OK to me with a trivial change here.

Jim


More information about the Binutils mailing list