mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 22:34:33 +01:00
The exec_target binary could segfault calling _exit(2) because r13 is not set up properly (and libc looks at that when performing a syscall). Call SYS_exit using syscall(2) which doesn't seem to have this problem. Signed-off-by: Nicholas Piggin <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
17 lines
253 B
C
17 lines
253 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
/*
|
|
* Part of fork context switch microbenchmark.
|
|
*
|
|
* Copyright 2018, Anton Blanchard, IBM Corp.
|
|
*/
|
|
|
|
#define _GNU_SOURCE
|
|
#include <unistd.h>
|
|
#include <sys/syscall.h>
|
|
|
|
void _start(void)
|
|
{
|
|
syscall(SYS_exit, 0);
|
|
}
|