This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Getting information on symbols and linkages at run-time
- From: Dr William Bland <gcc at abstractnonsense dot com>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 1 Jul 2003 15:37:59 +0000
- Subject: Re: Getting information on symbols and linkages at run-time
- References: <20030630152613.B23457@ns.jfreebies.com> <Pine.LNX.4.44.0306301121240.10302-100000@ops2.one-point.com>
- Reply-to: Dr William Bland <gcc at abstractnonsense dot com>
On Mon, Jun 30, 2003 at 11:28:26AM -0400, Jeff Sturm wrote:
>
> On Mon, 30 Jun 2003, Dr William Bland wrote:
> > A more pressing problem for me is calling arbitrary kernel functions. I
> > plan to do this with some assembler glue that loops through a list of
> > user-supplied arguments and, depending on the linkage of the C function
> > being called, either pushes the arguments onto the stack or loads them
> > into registers.
>
> Are you using libffi? This sort of glue has been written before and
> allows you to call arbitrary functions from an interpreter somewhat
> portably (it hasn't yet been ported to as many machines as the Linux
> kernel).
>
Thanks Jeff - I wasn't aware of libffi. It does look very useful!
Best wishes,
Bill.
--
Dr. William Bland. Computer Programmer, UK.
www.abstractnonsense.com