mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 00:26:41 +07:00
selftests/powerpc: fix exec benchmark
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 <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
7ef73cd39b
commit
c906d2c74e
@ -6,8 +6,11 @@
|
||||
* Copyright 2018, Anton Blanchard, IBM Corp.
|
||||
*/
|
||||
|
||||
void _exit(int);
|
||||
#define _GNU_SOURCE
|
||||
#include <unistd.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
void _start(void)
|
||||
{
|
||||
_exit(0);
|
||||
syscall(SYS_exit, 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user