2025-01-04 05:34:24 -05:00
|
|
|
--- a/meson.build
|
|
|
|
+++ b/meson.build
|
|
|
|
@@ -1,5 +1,5 @@
|
|
|
|
project('qemu', ['c'], meson_version: '>=1.5.0',
|
|
|
|
- default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=gnu++11', 'b_colorout=auto',
|
|
|
|
+ default_options: ['warning_level=1', 'c_std=gnu11', 'cpp_std=gnu++11', 'b_colorout=auto', 'b_lundef=false',
|
|
|
|
'b_staticpic=true', 'stdsplit=false', 'optimization=2', 'b_pie=true'],
|
|
|
|
version: files('VERSION'))
|
|
|
|
|
|
|
|
--- a/linux-user/syscall.c
|
|
|
|
+++ b/linux-user/syscall.c
|
|
|
|
@@ -9077,6 +9077,8 @@
|
|
|
|
int, __to_dfd, const char *, __to_pathname, unsigned int, flag)
|
|
|
|
#endif
|
|
|
|
|
2025-02-14 23:10:29 -05:00
|
|
|
+extern int trampoline_handle_syscall(int32_t num, uint32_t arg1, uint32_t arg2, uint32_t arg3);
|
2025-01-04 05:34:24 -05:00
|
|
|
+
|
|
|
|
/* This is an internal helper for do_syscall so that it is easier
|
|
|
|
* to have a single return point, so that actions, such as logging
|
|
|
|
* of syscall results, can be performed.
|
|
|
|
@@ -9101,6 +9103,10 @@
|
|
|
|
#endif
|
|
|
|
void *p;
|
|
|
|
|
2025-02-14 23:10:29 -05:00
|
|
|
+ if (trampoline_handle_syscall(num, arg1, arg2, arg3)) {
|
2025-01-04 05:34:24 -05:00
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
switch(num) {
|
|
|
|
case TARGET_NR_exit:
|
|
|
|
/* In old applications this may be used to implement _exit(2).
|