qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Michael Clark <mjc@sifive.com>,
	qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Cc: patches@groups.riscv.org, Michael Tokarev <mjt@tls.msk.ru>,
	Richard Henderson <richard.henderson@linaro.org>,
	Alistair Francis <Alistair.Francis@wdc.com>
Subject: Re: [Qemu-devel] [PATCH v2] elf: Add RISC-V PSABI ELF header defines
Date: Fri, 25 May 2018 09:53:48 +0200	[thread overview]
Message-ID: <4926fd94-b29b-8dad-bbdb-e19729bfa39f@vivier.eu> (raw)
In-Reply-To: <1527232960-51123-1-git-send-email-mjc@sifive.com>

Le 25/05/2018 à 09:22, Michael Clark a écrit :
> Refer to the RISC-V PSABI specification for details:
> 
> - https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md
> 
> Cc: Michael Tokarev <mjt@tls.msk.ru>
> Cc: Laurent Vivier <laurent@vivier.eu>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Alistair Francis <Alistair.Francis@wdc.com>
> Signed-off-by: Michael Clark <mjc@sifive.com>
> ---
>  include/elf.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/elf.h b/include/elf.h
> index 934dbbd6b3ae..bd0493f43d19 100644
> --- a/include/elf.h
> +++ b/include/elf.h
> @@ -1285,6 +1285,14 @@ typedef struct {
>  #define R_IA64_DTPREL64LSB	0xb7	/* @dtprel(sym + add), data8 LSB */
>  #define R_IA64_LTOFF_DTPREL22	0xba	/* @ltoff(@dtprel(s+a)), imm22 */
>  
> +/* RISC-V specific definitions.  */
> +#define EF_RISCV_RVC 0x0001
> +#define EF_RISCV_FLOAT_ABI_SINGLE 0x0002
> +#define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004
> +#define EF_RISCV_FLOAT_ABI_QUAD 0x0006
> +#define EF_RISCV_RVE 0x0008
> +#define EF_RISCV_TSO 0x0010
> +
>  typedef struct elf32_rel {
>    Elf32_Addr	r_offset;
>    Elf32_Word	r_info;
> 

from glibc (and binutils), I have:

  /* RISC-V ELF Flags */
  #define EF_RISCV_RVC                    0x0001
  #define EF_RISCV_FLOAT_ABI              0x0006
  #define EF_RISCV_FLOAT_ABI_SOFT         0x0000
  #define EF_RISCV_FLOAT_ABI_SINGLE       0x0002
  #define EF_RISCV_FLOAT_ABI_DOUBLE       0x0004
  #define EF_RISCV_FLOAT_ABI_QUAD         0x0006

Perhaps you can also define EF_RISCV_FLOAT_ABI_SOFT and EF_RISCV_FLOAT_ABI?

Anyway:

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

  reply	other threads:[~2018-05-25  7:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25  7:22 [Qemu-devel] [PATCH v2] elf: Add RISC-V PSABI ELF header defines Michael Clark
2018-05-25  7:53 ` Laurent Vivier [this message]
2018-05-25  9:25   ` Michael Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4926fd94-b29b-8dad-bbdb-e19729bfa39f@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=Alistair.Francis@wdc.com \
    --cc=mjc@sifive.com \
    --cc=mjt@tls.msk.ru \
    --cc=patches@groups.riscv.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).