1 /* 2 * Copyright (c) 2015 The Chromium OS Authors. All rights reserved. 3 * Use of this source code is governed by a BSD-style license that can be 4 * found in the LICENSE file. 5 */ 6 7 #include <stdlib.h> 8 #include <unistd.h> 9 10 #include <sys/prctl.h> 11 12 #ifndef PR_ALT_SYSCALL 13 #define PR_ALT_SYSCALL 0x43724f53 14 #define PR_ALT_SYSCALL_SET_SYSCALL_TABLE 1 15 #endif 16 main(void)17int main(void) { 18 int ret; 19 20 ret = prctl(PR_ALT_SYSCALL, PR_ALT_SYSCALL_SET_SYSCALL_TABLE, 21 "read_write_test"); 22 if (ret < 0) 23 return 1; 24 25 return 0; 26 } 27