-#noargs
-grep "^syscall [^ ]* nr [^ ]* nbargs ${NRARGS} " ${SRCFILE} > ${TMPFILE}
-perl -p -e 's/^syscall ([^ ]*) nr ([^ ]*) nbargs ([^ ]*) .*$/'\
-'TRACE_SYSCALL_TABLE\(syscalls_noargs, sys_$1, $2, $3\)/g'\
- ${TMPFILE} >> ${HEADER}
+ #noargs
+
+ # shellcheck disable=SC2129
+ printf '#ifdef SC_ENTER\n' >> "${HEADER}"
+
+ # shellcheck disable=SC2026
+ grep "^syscall [^ ]* nr [^ ]* nbargs ${NRARGS} " "${SRCFILE}" | \
+ perl -p -e 's/^syscall ([^ ]*) nr ([^ ]*) nbargs ([^ ]*) .*$/'\
+'#ifndef OVERRIDE_TABLE_'"${BITNESS}"'_$1\n'\
+'TRACE_SYSCALL_TABLE\(syscalls_noargs, $1, $2, $3\)\n'\
+'#endif/g' >> "${HEADER}"
+
+ printf '#else /* #ifdef SC_ENTER */\n' >> "${HEADER}"
+
+ # shellcheck disable=SC2026
+ grep "^syscall [^ ]* nr [^ ]* nbargs ${NRARGS} " "${SRCFILE}" | \
+ perl -p -e 's/^syscall ([^ ]*) nr ([^ ]*) nbargs ([^ ]*) .*$/'\
+'#ifndef OVERRIDE_TABLE_'"${BITNESS}"'_$1\n'\
+'TRACE_SYSCALL_TABLE($1, $1, $2, $3)\n'\
+'#endif/g' >> "${HEADER}"
+
+ printf '#endif /* else #ifdef SC_ENTER */\n' >> "${HEADER}"