Hi,
i would like to play with the constructing calls feature of gcc...
From the doc :
— Built-in Function:
void * __builtin_apply (void (*function)(), void *arguments, size_t size)
This built-in function invokes function with a copy of the parameters described by arguments and size.
The value of arguments should be the value returned by
__builtin_apply_args
. The argument size specifies the size of the stack argument data, in bytes.This function returns a pointer to data describing how to return whatever value was returned by function. The data is saved in a block of memory allocated on the stack.
It is not always simple to compute the proper value for size. The value is used by
__builtin_apply
to compute the amount of data that should be pushed on the stack and copied from the incoming argument area.
My question is how to know what size to give to this size argument ? And what are the consequences if the value is too small or too large ?
Thanks...