public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Kurt Roeckx <kurt@roeckx.be>
To: Mark Wielaard <mark@klomp.org>
Cc: Jim Wilson <jimw@sifive.com>,
	elfutils-devel@sourceware.org,	Karsten Merker <merker@debian.org>
Subject: Re: RISC-V support
Date: Fri, 11 Jan 2019 23:23:00 -0000	[thread overview]
Message-ID: <20190111232332.GA12090@roeckx.be> (raw)
In-Reply-To: <c78cbce53b0276468331a647d669648ed9caa05f.camel@klomp.org>

On Tue, Jan 08, 2019 at 02:52:33PM +0100, Mark Wielaard wrote:
> > There is a problem here though.  The riscv support was written to try
> > to handle both 32-bit and 64-bit targets with a single elfutils
> > backend.  But I have 6 ABIs I need to (theoretically) handle in
> > riscv_retval.c.  The return_value_location function doesn't take any
> > ebl or elf pointer, so I can't handle it there.  I can handle it in
> > riscv_init.c by checking ebl and elf pointers there, and calling an
> > appropriate function, but I'm not sure if that is OK.  Currently,
> > none
> > of the *_init.c files are using the elf pointer argument.
> 
> The ppc64 init does (to lookup the odp table which is necessary for
> ppc64[be], but not ppc64le). It is allowed. And the backends/ebl
> interface is completely internal, so feel free to suggest changes if
> they make sense for riscv. If it is necessary we'll just update the
> other backends.

I've been looking at mips, and it seems to have many different
ABIs too. A patch I've received does this:
int
mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
{
  /* First find the ABI used by the elf object */
  enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);

The patch only supports 6 ABIs, but I think there are really over
10 ABIs.

Maybe it would be good that we only need to determine the ABI
once, instead of each time the function is called.


Kurt

  parent reply	other threads:[~2019-01-11 23:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27  2:29 Jim Wilson
2019-01-08 13:52 ` Mark Wielaard
2019-01-08 19:28   ` Jim Wilson
2019-01-08 21:52   ` Karsten Merker
2019-01-11 23:23   ` Kurt Roeckx [this message]
2019-01-12 22:35     ` Mark Wielaard
2019-01-12 23:21       ` Kurt Roeckx
2019-01-13  1:06         ` Jim Wilson
2019-01-13  1:23           ` Kurt Roeckx
2019-01-13 22:15             ` Jim Wilson

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=20190111232332.GA12090@roeckx.be \
    --to=kurt@roeckx.be \
    --cc=elfutils-devel@sourceware.org \
    --cc=jimw@sifive.com \
    --cc=mark@klomp.org \
    --cc=merker@debian.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 read-only IMAP folder(s) and NNTP newsgroup(s).