From: Andrew Haley <aph@redhat.com>
To: Adrien <camaradetux@gmail.com>
Cc: libffi-discuss@sourceware.org
Subject: Re: [libffi] variable arguments support
Date: Sat, 31 Oct 2009 18:29:00 -0000 [thread overview]
Message-ID: <4AEC81EC.3020409@redhat.com> (raw)
In-Reply-To: <666572260910301305s70f75aefnd73ede1cbd65f59b@mail.gmail.com>
Adrien wrote:
> I am trying to call a function with variable arguments. The libffi
> README in gcc-4.3 sources mentionned this wasn't possible yet. The
> more recent libffi sources (latest tarball available) mention:
>
>> There is no support for calling varargs functions. This may work on
>> some platforms, depending on how the ABI is defined, but it is not
>> reliable.
>
> Should I read that as "if this work for you, try lotto" or has there
> been some actual effort towards that?
> I tried a small test program on linux32, linux64 and sparc32 and it
> worked each time. The code is available on vpaste.net[1] (simple
> pastebin). I tried to make it long enough to trigger potential
> problems but I don't know that much low-level stuff and I'm not sure
> I'm testing for the right thing.
>
> I'd like comments about this. I don't need extensive support but I
> need at least linux32/64, win32/64 and (various) bsd (I'm writing a
> desktop app).
I have never knowingly used any ABI that has a different calling
convention for varargs and non-varargs functions. Such ABIs probably
exist, but I wouldn't worry too much about the possibility.
Andrew.
prev parent reply other threads:[~2009-10-31 18:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-30 20:06 Adrien
2009-10-31 18:29 ` Andrew Haley [this message]
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=4AEC81EC.3020409@redhat.com \
--to=aph@redhat.com \
--cc=camaradetux@gmail.com \
--cc=libffi-discuss@sourceware.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).