test/threaded_execve: fix on metag
The metag ABI has stacks growing upwards so clone expects the stack argument to point at the bottom of the stack instead of the top. * test/threaded_execve.c [__metag__]: Define clone2 differently to avoid a segfault at runtime. Signed-off-by: James Hogan <james.hogan@imgtec.com>
This commit is contained in:
parent
5cf23c53b8
commit
554e6f3240
@ -54,6 +54,9 @@
|
||||
extern int __clone2(int (*fn) (void *), void *child_stack_base,
|
||||
size_t stack_size, int flags, void *arg, ...);
|
||||
#define clone2 __clone2
|
||||
#elif defined(__metag__)
|
||||
#define clone2(func, stack_base, size, flags, arg...) \
|
||||
clone(func, stack_base, flags, arg)
|
||||
#else
|
||||
#define clone2(func, stack_base, size, flags, arg...) \
|
||||
clone(func, (stack_base) + (size), flags, arg)
|
||||
|
Loading…
Reference in New Issue
Block a user