This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Stack mangling for anonymous function pointers


I'm working on a system where we're jumping from Java into C to pull a
function out of a dictionary (indexed by string name) and calling it
as a 'long (*)(void *, ...).  There's some confusion as to if there is
a method to copy a structure or an array onto the stack through the
... arg such that the remainder of the stack can be used for the
specific arguments that the function is looking for (ie, "f(void *,
int, long, long, double)").  Online documentation has some static as
to whether a pointer to, or the whole structure is copied onto the
stack.

Is there a reliable way to write data to the stack such that a called
function pointer can extract the values it seeks?

Thanks,
Matt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]