Fix program execution on Android 15 QPR2 Beta
authorPo Lu <luangruo@yahoo.com>
Sun, 9 Feb 2025 04:06:52 +0000 (12:06 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 9 Feb 2025 04:06:52 +0000 (12:06 +0800)
commit563efd6838c1b62c8962385911b5fd5c5637ab96
treeec0a6294ad51fcdd9b916241959115aade90759a
parented9dd4705c7299c12c18d566bd8db4183b1c57f3
Fix program execution on Android 15 QPR2 Beta

* exec/trace.c (process_vm_readv, process_vm_writev): New
function pointers.  Attempt to load them on recent Android
systems when `exec' was not linked with a sufficiently
up-to-date libc.
(read_memory, user_copy): Always use process_vm_readv and
process_vm_writev if available.
(handle_openat): Write trailing NULL byte of filename to user
buffer.
(exec_init): Attempt to dlsym process_vm_readv and
process_vm_writev.
exec/trace.c