Introduce a new AWK script that autogenerates an additional, custom
defined, exportsyms that contains all `uk_syscall_*` symbols as per
each library's `UK_SYSCALLS_PROVIDED-*`.
This will help in reducing exportsyms.uk noise from now on as we no
longer have to manually add these supposedly internal symbols.
Checkpatch-Ignore: SPDX_LICENSE_TAG
Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Michalis Pappas <michalis@unikraft.io>
GitHub-Closes: #1577
LIBSYSCALL_SHIM_SYSCALL_PROVIDED_SUBBUILD = $(LIBSYSCALL_SHIM_INCLUDES_SUBBUILD)
LIBSYSCALL_SHIM_SYSCALL_PROVIDED_AWKINCLUDES-y += $(LIBSYSCALL_SHIM_BUILD)/provided_syscalls.in
LIBSYSCALL_SHIM_SYSCALL_PROVIDED_AWKFLAGS-y += -F '-'
+LIBSYSCALL_SHIM_SRCS-y += $(LIBSYSCALL_SHIM_BASE)/syscall_gensyms.awk>.exportsyms.uk
+LIBSYSCALL_SHIM_SYSCALL_GENSYMS_AWKINCLUDES-y += $(LIBSYSCALL_SHIM_BUILD)/provided_syscalls.in
+LIBSYSCALL_SHIM_SYSCALL_GENSYMS_AWKFLAGS-y += -F '-'
+EACHOLIB_EXPORTS-$(CONFIG_LIBSYSCALL_SHIM) += $(LIBSYSCALL_SHIM_BUILD)/syscall_gensyms.exportsyms.uk
LIBSYSCALL_SHIM_SRCS-y += $(LIBSYSCALL_SHIM_BASE)/syscall_static.awk>.h
LIBSYSCALL_SHIM_SYSCALL_STATIC_SUBBUILD = $(LIBSYSCALL_SHIM_INCLUDES_SUBBUILD)
LIBSYSCALL_SHIM_SYSCALL_STATIC_AWKINCLUDES-y += $(LIBSYSCALL_SHIM_BUILD)/provided_syscalls.in
--- /dev/null
+/[a-zA-Z0-9]+-[0-9]+e?/{
+ name = $1;
+ printf "uk_syscall_r_%s\n", name;
+ printf "uk_syscall_e_%s\n", name;
+ if (substr($0, length($0)) == "e") {
+ printf "uk_syscall_r_e_%s\n", name;
+ printf "uk_syscall_e_e_%s\n", name;
+ }
+}