Index: build.sh ================================================================== --- build.sh +++ build.sh @@ -254,10 +254,17 @@ base="$(basename $rt)" dest="$to/$mod.${base%%.s}.o" comp_asm "$rt" "$dest" rt_objects+=("$dest") done +done +# Compile just the error lists for all modules, regardless of enabled modules +for errs in $(scan mod "err.c"); do + base="$(basename $(dirname $errs))" + dest="$to/$base.err.o" + comp_co "$errs" "$dest" + data_objects+=("$dest") done # fourth pass: link the libraries that are # configured to be built ADDED mod/kbuild/err.c Index: mod/kbuild/err.c ================================================================== --- mod/kbuild/err.c +++ mod/kbuild/err.c @@ -0,0 +1,1 @@ +const char *kbuild_error_strings[] = {}; ADDED mod/kcli/err.c Index: mod/kcli/err.c ================================================================== --- mod/kcli/err.c +++ mod/kcli/err.c @@ -0,0 +1,1 @@ +const char *kcli_error_strings[] = {}; ADDED mod/kconf/err.c Index: mod/kconf/err.c ================================================================== --- mod/kconf/err.c +++ mod/kconf/err.c @@ -0,0 +1,1 @@ +const char *kconf_error_strings[] = {}; ADDED mod/kcore/err.c Index: mod/kcore/err.c ================================================================== --- mod/kcore/err.c +++ mod/kcore/err.c @@ -0,0 +1,1 @@ +const char *kcore_error_strings[] = {}; ADDED mod/kdb/err.c Index: mod/kdb/err.c ================================================================== --- mod/kdb/err.c +++ mod/kdb/err.c @@ -0,0 +1,1 @@ +const char *kdb_error_strings[] = {}; ADDED mod/kdbg/err.c Index: mod/kdbg/err.c ================================================================== --- mod/kdbg/err.c +++ mod/kdbg/err.c @@ -0,0 +1,1 @@ +const char *kdbg_error_strings[] = {}; ADDED mod/kfile/err.c Index: mod/kfile/err.c ================================================================== --- mod/kfile/err.c +++ mod/kfile/err.c @@ -0,0 +1,1 @@ +const char *kfile_error_strings[] = {}; ADDED mod/kgraft/err.c Index: mod/kgraft/err.c ================================================================== --- mod/kgraft/err.c +++ mod/kgraft/err.c @@ -0,0 +1,1 @@ +const char *kgraft_error_strings[] = {}; ADDED mod/kio/err.c Index: mod/kio/err.c ================================================================== --- mod/kio/err.c +++ mod/kio/err.c @@ -0,0 +1,1 @@ +const char *kio_error_strings[] = {}; ADDED mod/kmem/err.c Index: mod/kmem/err.c ================================================================== --- mod/kmem/err.c +++ mod/kmem/err.c @@ -0,0 +1,1 @@ +const char *kmem_error_strings[] = {}; ADDED mod/kmsg/err.c Index: mod/kmsg/err.c ================================================================== --- mod/kmsg/err.c +++ mod/kmsg/err.c @@ -0,0 +1,1 @@ +const char *kmsg_error_strings[] = {}; ADDED mod/knet/err.c Index: mod/knet/err.c ================================================================== --- mod/knet/err.c +++ mod/knet/err.c @@ -0,0 +1,1 @@ +const char *knet_error_strings[] = {}; ADDED mod/knum/err.c Index: mod/knum/err.c ================================================================== --- mod/knum/err.c +++ mod/knum/err.c @@ -0,0 +1,1 @@ +const char *knum_error_strings[] = {}; ADDED mod/kproc/err.c Index: mod/kproc/err.c ================================================================== --- mod/kproc/err.c +++ mod/kproc/err.c @@ -0,0 +1,1 @@ +const char *kproc_error_strings[] = {}; ADDED mod/kstr/err.c Index: mod/kstr/err.c ================================================================== --- mod/kstr/err.c +++ mod/kstr/err.c @@ -0,0 +1,1 @@ +const char *kstr_error_strings[] = {}; ADDED mod/kterm/err.c Index: mod/kterm/err.c ================================================================== --- mod/kterm/err.c +++ mod/kterm/err.c @@ -0,0 +1,1 @@ +const char *kterm_error_strings[] = {};