Commit
7488ce9e23f1 "Check whether PTRACE_GET_SYSCALL_INFO is supported
by the kernel" added a fork() call in test_ptrace_get_syscall_info()
which is included in the main strace executable code. Although the
test_ptrace_get_syscall_info() routine is not called on no-MMU targets,
the compiler can't optimize it out because it is a global symbol.
So build for no-MMU targets currently fails:
strace-ptrace_syscall_info.o: In function `test_ptrace_get_syscall_info':
ptrace_syscall_info.c:(.text+0x1c): undefined reference to `fork'
* ptrace_syscall_info.c (test_ptrace_get_syscall_info): Make
the definition depend on HAVE_FORK.
* strace.c (init): Call test_ptrace_get_syscall_info unconditionally.
* NEWS: Mention this fix.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Fixes: v4.26~50 "Check whether PTRACE_GET_SYSCALL_INFO is supported by the kernel"
* Bug fixes
* Fixed strace-k test on alpha.
+ * Fixed build on NOMMU architectures.
Noteworthy changes in release 4.26 (2018-12-26)
===============================================
bool
test_ptrace_get_syscall_info(void)
{
+ /*
+ * NOMMU provides no forks necessary for PTRACE_GET_SYSCALL_INFO test,
+ * leave the default unchanged.
+ */
+#ifdef HAVE_FORK
static const unsigned long args[][7] = {
/* a sequence of architecture-agnostic syscalls */
{
debug_msg("PTRACE_GET_SYSCALL_INFO works");
else
debug_msg("PTRACE_GET_SYSCALL_INFO does not work");
+#endif /* HAVE_FORK */
return ptrace_get_syscall_info_supported;
}
PTRACE_O_TRACEVFORK;
debug_msg("ptrace_setoptions = %#x", ptrace_setoptions);
test_ptrace_seize();
-
- /*
- * NOMMU provides no forks necessary for PTRACE_GET_SYSCALL_INFO test,
- * leave the default unchanged.
- */
- if (!NOMMU_SYSTEM)
- test_ptrace_get_syscall_info();
+ test_ptrace_get_syscall_info();
/*
* Is something weird with our stdin and/or stdout -