diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 6505de594ab2..af31d33ae219 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -1720,4 +1720,77 @@ test-symtab/basic/single_undefined_function.so \
 test-symtab/basic/single_undefined_variable.c \
 test-symtab/basic/single_undefined_variable.so \
 test-symtab/basic/single_variable.c \
-test-symtab/basic/single_variable.so
+test-symtab/basic/single_variable.so \
+\
+test-symtab/kernel/Makefile \
+test-symtab/kernel/empty.c \
+test-symtab/kernel/one_of_each.c \
+test-symtab/kernel/single_function.c \
+test-symtab/kernel/single_function_gpl.c \
+test-symtab/kernel/single_variable.c \
+test-symtab/kernel/single_variable_gpl.c \
+test-symtab/kernel-4.14/Makefile \
+test-symtab/kernel-4.14/empty.c \
+test-symtab/kernel-4.14/empty.ko \
+test-symtab/kernel-4.14/one_of_each.c \
+test-symtab/kernel-4.14/one_of_each.ko \
+test-symtab/kernel-4.14/single_function.c \
+test-symtab/kernel-4.14/single_function.ko \
+test-symtab/kernel-4.14/single_function_gpl.c \
+test-symtab/kernel-4.14/single_function_gpl.ko \
+test-symtab/kernel-4.14/single_variable.c \
+test-symtab/kernel-4.14/single_variable.ko \
+test-symtab/kernel-4.14/single_variable_gpl.c \
+test-symtab/kernel-4.14/single_variable_gpl.ko \
+test-symtab/kernel-4.19/Makefile \
+test-symtab/kernel-4.19/empty.c \
+test-symtab/kernel-4.19/empty.ko \
+test-symtab/kernel-4.19/one_of_each.c \
+test-symtab/kernel-4.19/one_of_each.ko \
+test-symtab/kernel-4.19/single_function.c \
+test-symtab/kernel-4.19/single_function.ko \
+test-symtab/kernel-4.19/single_function_gpl.c \
+test-symtab/kernel-4.19/single_function_gpl.ko \
+test-symtab/kernel-4.19/single_variable.c \
+test-symtab/kernel-4.19/single_variable.ko \
+test-symtab/kernel-4.19/single_variable_gpl.c \
+test-symtab/kernel-4.19/single_variable_gpl.ko \
+test-symtab/kernel-5.3/Makefile \
+test-symtab/kernel-5.3/empty.c \
+test-symtab/kernel-5.3/empty.ko \
+test-symtab/kernel-5.3/one_of_each.c \
+test-symtab/kernel-5.3/one_of_each.ko \
+test-symtab/kernel-5.3/single_function.c \
+test-symtab/kernel-5.3/single_function.ko \
+test-symtab/kernel-5.3/single_function_gpl.c \
+test-symtab/kernel-5.3/single_function_gpl.ko \
+test-symtab/kernel-5.3/single_variable.c \
+test-symtab/kernel-5.3/single_variable.ko \
+test-symtab/kernel-5.3/single_variable_gpl.c \
+test-symtab/kernel-5.3/single_variable_gpl.ko \
+test-symtab/kernel-5.4/Makefile \
+test-symtab/kernel-5.4/empty.c \
+test-symtab/kernel-5.4/empty.ko \
+test-symtab/kernel-5.4/one_of_each.c \
+test-symtab/kernel-5.4/one_of_each.ko \
+test-symtab/kernel-5.4/single_function.c \
+test-symtab/kernel-5.4/single_function.ko \
+test-symtab/kernel-5.4/single_function_gpl.c \
+test-symtab/kernel-5.4/single_function_gpl.ko \
+test-symtab/kernel-5.4/single_variable.c \
+test-symtab/kernel-5.4/single_variable.ko \
+test-symtab/kernel-5.4/single_variable_gpl.c \
+test-symtab/kernel-5.4/single_variable_gpl.ko \
+test-symtab/kernel-5.6/Makefile \
+test-symtab/kernel-5.6/empty.c \
+test-symtab/kernel-5.6/empty.ko \
+test-symtab/kernel-5.6/one_of_each.c \
+test-symtab/kernel-5.6/one_of_each.ko \
+test-symtab/kernel-5.6/single_function.c \
+test-symtab/kernel-5.6/single_function.ko \
+test-symtab/kernel-5.6/single_function_gpl.c \
+test-symtab/kernel-5.6/single_function_gpl.ko \
+test-symtab/kernel-5.6/single_variable.c \
+test-symtab/kernel-5.6/single_variable.ko \
+test-symtab/kernel-5.6/single_variable_gpl.c \
+test-symtab/kernel-5.6/single_variable_gpl.ko
diff --git a/tests/data/test-symtab/kernel-4.14/Makefile b/tests/data/test-symtab/kernel-4.14/Makefile
new file mode 120000
index 000000000000..c7e68bddd8d2
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.14/Makefile
@@ -0,0 +1 @@
+../kernel/Makefile
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.14/empty.c b/tests/data/test-symtab/kernel-4.14/empty.c
new file mode 120000
index 000000000000..ac07d5e725cc
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.14/empty.c
@@ -0,0 +1 @@
+../kernel/empty.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.14/empty.ko b/tests/data/test-symtab/kernel-4.14/empty.ko
new file mode 100644
index 0000000000000000000000000000000000000000..03f62bb9e71b61efaa410688cb75eac8a4a07ecd
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.14/one_of_each.c b/tests/data/test-symtab/kernel-4.14/one_of_each.c
new file mode 120000
index 000000000000..27c87e5758cb
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.14/one_of_each.c
@@ -0,0 +1 @@
+../kernel/one_of_each.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.14/one_of_each.ko b/tests/data/test-symtab/kernel-4.14/one_of_each.ko
new file mode 100644
index 0000000000000000000000000000000000000000..6c5fe2b5fe93b8b8712a1a1cba18ec1f4ca44c96
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.14/single_function.c b/tests/data/test-symtab/kernel-4.14/single_function.c
new file mode 120000
index 000000000000..a0055533bd8e
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.14/single_function.c
@@ -0,0 +1 @@
+../kernel/single_function.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.14/single_function.ko b/tests/data/test-symtab/kernel-4.14/single_function.ko
new file mode 100644
index 0000000000000000000000000000000000000000..bfa2e2c31d1eafae7cf428d124be98b756475eba
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.14/single_function_gpl.c b/tests/data/test-symtab/kernel-4.14/single_function_gpl.c
new file mode 120000
index 000000000000..3f9b47f8514e
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.14/single_function_gpl.c
@@ -0,0 +1 @@
+../kernel/single_function_gpl.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.14/single_function_gpl.ko b/tests/data/test-symtab/kernel-4.14/single_function_gpl.ko
new file mode 100644
index 0000000000000000000000000000000000000000..b05ec4d551e1d8b8e60af0d50f910c7ab72aa9a4
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.14/single_variable.c b/tests/data/test-symtab/kernel-4.14/single_variable.c
new file mode 120000
index 000000000000..196fb4c0ba58
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.14/single_variable.c
@@ -0,0 +1 @@
+../kernel/single_variable.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.14/single_variable.ko b/tests/data/test-symtab/kernel-4.14/single_variable.ko
new file mode 100644
index 0000000000000000000000000000000000000000..73ba479fa7933d8126ff0eba9b4f224050245789
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.14/single_variable_gpl.c b/tests/data/test-symtab/kernel-4.14/single_variable_gpl.c
new file mode 120000
index 000000000000..dc09c0d27870
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.14/single_variable_gpl.c
@@ -0,0 +1 @@
+../kernel/single_variable_gpl.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.14/single_variable_gpl.ko b/tests/data/test-symtab/kernel-4.14/single_variable_gpl.ko
new file mode 100644
index 0000000000000000000000000000000000000000..30f9a082c6506752ca89cb95c24eae601e55eb6e
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.19/Makefile b/tests/data/test-symtab/kernel-4.19/Makefile
new file mode 120000
index 000000000000..c7e68bddd8d2
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.19/Makefile
@@ -0,0 +1 @@
+../kernel/Makefile
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.19/empty.c b/tests/data/test-symtab/kernel-4.19/empty.c
new file mode 120000
index 000000000000..ac07d5e725cc
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.19/empty.c
@@ -0,0 +1 @@
+../kernel/empty.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.19/empty.ko b/tests/data/test-symtab/kernel-4.19/empty.ko
new file mode 100644
index 0000000000000000000000000000000000000000..e76515434c12185b2d312a5d78b94369b64d9ec5
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.19/one_of_each.c b/tests/data/test-symtab/kernel-4.19/one_of_each.c
new file mode 120000
index 000000000000..27c87e5758cb
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.19/one_of_each.c
@@ -0,0 +1 @@
+../kernel/one_of_each.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.19/one_of_each.ko b/tests/data/test-symtab/kernel-4.19/one_of_each.ko
new file mode 100644
index 0000000000000000000000000000000000000000..293d07eb038666fb2debde483584dce42553851e
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.19/single_function.c b/tests/data/test-symtab/kernel-4.19/single_function.c
new file mode 120000
index 000000000000..a0055533bd8e
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.19/single_function.c
@@ -0,0 +1 @@
+../kernel/single_function.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.19/single_function.ko b/tests/data/test-symtab/kernel-4.19/single_function.ko
new file mode 100644
index 0000000000000000000000000000000000000000..890b125275d59aac05b5f73abe4e5e19e0c55adc
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.19/single_function_gpl.c b/tests/data/test-symtab/kernel-4.19/single_function_gpl.c
new file mode 120000
index 000000000000..3f9b47f8514e
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.19/single_function_gpl.c
@@ -0,0 +1 @@
+../kernel/single_function_gpl.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.19/single_function_gpl.ko b/tests/data/test-symtab/kernel-4.19/single_function_gpl.ko
new file mode 100644
index 0000000000000000000000000000000000000000..237832543c6a73a5fb44d6c941d4847fa82266ff
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.19/single_variable.c b/tests/data/test-symtab/kernel-4.19/single_variable.c
new file mode 120000
index 000000000000..196fb4c0ba58
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.19/single_variable.c
@@ -0,0 +1 @@
+../kernel/single_variable.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.19/single_variable.ko b/tests/data/test-symtab/kernel-4.19/single_variable.ko
new file mode 100644
index 0000000000000000000000000000000000000000..cc81fd99fd05de6074faea51ae0b1349d398e9df
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-4.19/single_variable_gpl.c b/tests/data/test-symtab/kernel-4.19/single_variable_gpl.c
new file mode 120000
index 000000000000..dc09c0d27870
--- /dev/null
+++ b/tests/data/test-symtab/kernel-4.19/single_variable_gpl.c
@@ -0,0 +1 @@
+../kernel/single_variable_gpl.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-4.19/single_variable_gpl.ko b/tests/data/test-symtab/kernel-4.19/single_variable_gpl.ko
new file mode 100644
index 0000000000000000000000000000000000000000..e5742650e2154d97dd7ba617576c998abaca7ead
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.4/Makefile b/tests/data/test-symtab/kernel-5.4/Makefile
new file mode 120000
index 000000000000..c7e68bddd8d2
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.4/Makefile
@@ -0,0 +1 @@
+../kernel/Makefile
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.4/empty.c b/tests/data/test-symtab/kernel-5.4/empty.c
new file mode 120000
index 000000000000..ac07d5e725cc
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.4/empty.c
@@ -0,0 +1 @@
+../kernel/empty.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.4/empty.ko b/tests/data/test-symtab/kernel-5.4/empty.ko
new file mode 100644
index 0000000000000000000000000000000000000000..6a0769eb96c66ed6e58ef026f7b9d22e00cc3c75
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.4/one_of_each.c b/tests/data/test-symtab/kernel-5.4/one_of_each.c
new file mode 120000
index 000000000000..27c87e5758cb
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.4/one_of_each.c
@@ -0,0 +1 @@
+../kernel/one_of_each.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.4/one_of_each.ko b/tests/data/test-symtab/kernel-5.4/one_of_each.ko
new file mode 100644
index 0000000000000000000000000000000000000000..2a6e422fc2ce5e43bd9535854fc56da9a52e6391
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.4/single_function.c b/tests/data/test-symtab/kernel-5.4/single_function.c
new file mode 120000
index 000000000000..a0055533bd8e
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.4/single_function.c
@@ -0,0 +1 @@
+../kernel/single_function.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.4/single_function.ko b/tests/data/test-symtab/kernel-5.4/single_function.ko
new file mode 100644
index 0000000000000000000000000000000000000000..84d1d1504406899f366f5d813169b2d968ddc38a
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.4/single_function_gpl.c b/tests/data/test-symtab/kernel-5.4/single_function_gpl.c
new file mode 120000
index 000000000000..3f9b47f8514e
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.4/single_function_gpl.c
@@ -0,0 +1 @@
+../kernel/single_function_gpl.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.4/single_function_gpl.ko b/tests/data/test-symtab/kernel-5.4/single_function_gpl.ko
new file mode 100644
index 0000000000000000000000000000000000000000..d518defe2da8e7381fb9340ac40a4f7718d86151
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.4/single_variable.c b/tests/data/test-symtab/kernel-5.4/single_variable.c
new file mode 120000
index 000000000000..196fb4c0ba58
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.4/single_variable.c
@@ -0,0 +1 @@
+../kernel/single_variable.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.4/single_variable.ko b/tests/data/test-symtab/kernel-5.4/single_variable.ko
new file mode 100644
index 0000000000000000000000000000000000000000..d62235ec6d9eb2b0d04146396960589b7d40e7f1
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.4/single_variable_gpl.c b/tests/data/test-symtab/kernel-5.4/single_variable_gpl.c
new file mode 120000
index 000000000000..dc09c0d27870
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.4/single_variable_gpl.c
@@ -0,0 +1 @@
+../kernel/single_variable_gpl.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.4/single_variable_gpl.ko b/tests/data/test-symtab/kernel-5.4/single_variable_gpl.ko
new file mode 100644
index 0000000000000000000000000000000000000000..cdbd6a7d80b7cdc3c8b103104ab94833b3967c0f
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.6/Makefile b/tests/data/test-symtab/kernel-5.6/Makefile
new file mode 120000
index 000000000000..c7e68bddd8d2
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.6/Makefile
@@ -0,0 +1 @@
+../kernel/Makefile
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.6/empty.c b/tests/data/test-symtab/kernel-5.6/empty.c
new file mode 120000
index 000000000000..ac07d5e725cc
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.6/empty.c
@@ -0,0 +1 @@
+../kernel/empty.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.6/empty.ko b/tests/data/test-symtab/kernel-5.6/empty.ko
new file mode 100644
index 0000000000000000000000000000000000000000..265d7eaa15cfc9d27f37e0420589f9c4882eca34
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.6/one_of_each.c b/tests/data/test-symtab/kernel-5.6/one_of_each.c
new file mode 120000
index 000000000000..27c87e5758cb
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.6/one_of_each.c
@@ -0,0 +1 @@
+../kernel/one_of_each.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.6/one_of_each.ko b/tests/data/test-symtab/kernel-5.6/one_of_each.ko
new file mode 100644
index 0000000000000000000000000000000000000000..72bb8e1cc2acb7c472f5d3ba502dbec783587da0
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.6/single_function.c b/tests/data/test-symtab/kernel-5.6/single_function.c
new file mode 120000
index 000000000000..a0055533bd8e
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.6/single_function.c
@@ -0,0 +1 @@
+../kernel/single_function.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.6/single_function.ko b/tests/data/test-symtab/kernel-5.6/single_function.ko
new file mode 100644
index 0000000000000000000000000000000000000000..28e40813c98ae20700d5be69a2d483d75be608bf
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.6/single_function_gpl.c b/tests/data/test-symtab/kernel-5.6/single_function_gpl.c
new file mode 120000
index 000000000000..3f9b47f8514e
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.6/single_function_gpl.c
@@ -0,0 +1 @@
+../kernel/single_function_gpl.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.6/single_function_gpl.ko b/tests/data/test-symtab/kernel-5.6/single_function_gpl.ko
new file mode 100644
index 0000000000000000000000000000000000000000..d5643b5230e62cb47685c0ad9bc9dec53caff0aa
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.6/single_variable.c b/tests/data/test-symtab/kernel-5.6/single_variable.c
new file mode 120000
index 000000000000..196fb4c0ba58
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.6/single_variable.c
@@ -0,0 +1 @@
+../kernel/single_variable.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.6/single_variable.ko b/tests/data/test-symtab/kernel-5.6/single_variable.ko
new file mode 100644
index 0000000000000000000000000000000000000000..a3d71e6df73a0deebeac405a32900a21f2b000a8
GIT binary patch
diff --git a/tests/data/test-symtab/kernel-5.6/single_variable_gpl.c b/tests/data/test-symtab/kernel-5.6/single_variable_gpl.c
new file mode 120000
index 000000000000..dc09c0d27870
--- /dev/null
+++ b/tests/data/test-symtab/kernel-5.6/single_variable_gpl.c
@@ -0,0 +1 @@
+../kernel/single_variable_gpl.c
\ No newline at end of file
diff --git a/tests/data/test-symtab/kernel-5.6/single_variable_gpl.ko b/tests/data/test-symtab/kernel-5.6/single_variable_gpl.ko
new file mode 100644
index 0000000000000000000000000000000000000000..a2142a69133f2cdc77c9894874cf31b3b9274f1d
GIT binary patch
diff --git a/tests/data/test-symtab/kernel/Makefile b/tests/data/test-symtab/kernel/Makefile
new file mode 100644
index 000000000000..223db4550e50
--- /dev/null
+++ b/tests/data/test-symtab/kernel/Makefile
@@ -0,0 +1,19 @@
+obj-m += empty.o
+obj-m += single_function.o
+obj-m += single_function_gpl.o
+obj-m += single_variable.o
+obj-m += single_variable_gpl.o
+obj-m += one_of_each.o
+
+KDIR := /tmp/some/kernel/source/dir
+
+PWD := $(shell pwd)
+default:
+	make -C $(KDIR) tinyconfig
+	pushd $(KDIR); ./scripts/config -e 64BIT -e MODULES; $(MAKE) olddefconfig; popd
+	$(MAKE) -C $(KDIR)
+	$(MAKE) -C $(KDIR) M=$(PWD) modules
+	rm -rf *.mod.c *.o .*.cmd .*.d *.mod modules.order Module.symvers .tmp_versions
+
+clean:
+	rm *.ko
diff --git a/tests/data/test-symtab/kernel/empty.c b/tests/data/test-symtab/kernel/empty.c
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/tests/data/test-symtab/kernel/one_of_each.c b/tests/data/test-symtab/kernel/one_of_each.c
new file mode 100644
index 000000000000..9d461fbd0053
--- /dev/null
+++ b/tests/data/test-symtab/kernel/one_of_each.c
@@ -0,0 +1,16 @@
+#include <linux/module.h>
+
+void exported_function(void) {}
+EXPORT_SYMBOL(exported_function);
+
+void exported_function_gpl(void) {}
+EXPORT_SYMBOL_GPL(exported_function_gpl);
+
+int exported_variable = 1;
+EXPORT_SYMBOL(exported_variable);
+
+int exported_variable_gpl = 1;
+EXPORT_SYMBOL_GPL(exported_variable_gpl);
+
+void local_function(void) {}
+int local_variable = 2;
diff --git a/tests/data/test-symtab/kernel/single_function.c b/tests/data/test-symtab/kernel/single_function.c
new file mode 100644
index 000000000000..5160865f64ea
--- /dev/null
+++ b/tests/data/test-symtab/kernel/single_function.c
@@ -0,0 +1,7 @@
+#include <linux/module.h>
+
+void exported_function(void) {}
+EXPORT_SYMBOL(exported_function);
+
+void local_function(void) {}
+int local_variable = 2;
diff --git a/tests/data/test-symtab/kernel/single_function_gpl.c b/tests/data/test-symtab/kernel/single_function_gpl.c
new file mode 100644
index 000000000000..fb5503a0c111
--- /dev/null
+++ b/tests/data/test-symtab/kernel/single_function_gpl.c
@@ -0,0 +1,7 @@
+#include <linux/module.h>
+
+void exported_function_gpl(void) {}
+EXPORT_SYMBOL_GPL(exported_function_gpl);
+
+void local_function(void) {}
+int local_variable = 2;
diff --git a/tests/data/test-symtab/kernel/single_variable.c b/tests/data/test-symtab/kernel/single_variable.c
new file mode 100644
index 000000000000..20178f257406
--- /dev/null
+++ b/tests/data/test-symtab/kernel/single_variable.c
@@ -0,0 +1,7 @@
+#include <linux/module.h>
+
+int exported_variable = 1;
+EXPORT_SYMBOL(exported_variable);
+
+void local_function(void) {}
+int local_variable = 2;
diff --git a/tests/data/test-symtab/kernel/single_variable_gpl.c b/tests/data/test-symtab/kernel/single_variable_gpl.c
new file mode 100644
index 000000000000..552e9b500fc1
--- /dev/null
+++ b/tests/data/test-symtab/kernel/single_variable_gpl.c
@@ -0,0 +1,7 @@
+#include <linux/module.h>
+
+int exported_variable_gpl = 1;
+EXPORT_SYMBOL_GPL(exported_variable_gpl);
+
+void local_function(void) {}
+int local_variable = 2;
diff --git a/tests/test-symtab.cc b/tests/test-symtab.cc
index 62f8998af5d0..20e3071c7259 100644
--- a/tests/test-symtab.cc
+++ b/tests/test-symtab.cc
@@ -52,8 +52,9 @@ read_corpus(const std::string path, corpus_sptr& result)
 
   environment_sptr	    env(new environment);
   const std::vector<char**> debug_info_root_paths;
-  read_context_sptr	    ctxt =
-      create_read_context(absolute_path, debug_info_root_paths, env.get());
+  read_context_sptr	    ctxt = create_read_context(
+      absolute_path, debug_info_root_paths, env.get(),
+      /* load_all_type = */ true, /* linux_kernel_mode = */ true);
 
   dwarf_reader::status status = dwarf_reader::STATUS_UNKNOWN;
   result = read_corpus_from_elf(*ctxt, status);
@@ -105,7 +106,7 @@ assert_symbol_count(const std::string& path,
   const dwarf_reader::status status = read_corpus(path, corpus_ptr);
   REQUIRE(corpus_ptr);
 
-  REQUIRE(status == dwarf_reader::STATUS_OK);
+  REQUIRE((status & dwarf_reader::STATUS_OK));
   const corpus& corpus = *corpus_ptr;
 
   if (function_symbols != N)
@@ -203,3 +204,90 @@ TEST_CASE("Symtab::SimpleSymtabs", "[symtab, basic]")
     const corpus_sptr& corpus = assert_symbol_count(binary, 0, 0, 1, 1);
   }
 }
+
+static const char* kernel_versions[] = { "4.14", "4.19", "5.4", "5.6" };
+static const size_t nr_kernel_versions =
+    sizeof(kernel_versions) / sizeof(kernel_versions[0]);
+
+TEST_CASE("Symtab::SimpleKernelSymtabs", "[symtab, basic, kernel, ksymtab]")
+{
+  for (size_t i = 0; i < nr_kernel_versions; ++i)
+    {
+      const std::string base_path =
+	  "kernel-" + std::string(kernel_versions[i]) + "/";
+
+      GIVEN("The binaries in " + base_path)
+      {
+
+	GIVEN("a kernel module with no exported symbols")
+	{
+	  // TODO: should pass, but does currently not as empty tables are
+	  // treated
+	  //       like the error case, but this is an edge case anyway.
+	  // assert_symbol_count(base_path + "empty.so");
+	}
+
+	GIVEN("a kernel module with a single exported function")
+	{
+	  const std::string	 binary = base_path + "single_function.ko";
+	  const corpus_sptr&	 corpus = assert_symbol_count(binary, 1, 0);
+	  const elf_symbol_sptr& symbol =
+	      corpus->lookup_function_symbol("exported_function");
+	  REQUIRE(symbol);
+	  CHECK(!corpus->lookup_variable_symbol("exported_function"));
+	  CHECK(symbol == corpus->lookup_function_symbol(*symbol));
+	  CHECK(symbol != corpus->lookup_variable_symbol(*symbol));
+	}
+
+	GIVEN("a kernel module with a single GPL exported function")
+	{
+	  const std::string	 binary = base_path + "single_function_gpl.ko";
+	  const corpus_sptr&	 corpus = assert_symbol_count(binary, 1, 0);
+	  const elf_symbol_sptr& symbol =
+	      corpus->lookup_function_symbol("exported_function_gpl");
+	  REQUIRE(symbol);
+	  CHECK(!corpus->lookup_variable_symbol("exported_function_gpl"));
+	  CHECK(symbol == corpus->lookup_function_symbol(*symbol));
+	  CHECK(symbol != corpus->lookup_variable_symbol(*symbol));
+	}
+
+	GIVEN("a binary with a single exported variable")
+	{
+	  const std::string	 binary = base_path + "single_variable.ko";
+	  const corpus_sptr&	 corpus = assert_symbol_count(binary, 0, 1);
+	  const elf_symbol_sptr& symbol =
+	      corpus->lookup_variable_symbol("exported_variable");
+	  REQUIRE(symbol);
+	  CHECK(!corpus->lookup_function_symbol("exported_variable"));
+	  CHECK(symbol == corpus->lookup_variable_symbol(*symbol));
+	  CHECK(symbol != corpus->lookup_function_symbol(*symbol));
+	}
+
+	GIVEN("a binary with a single GPL exported variable")
+	{
+	  const std::string	 binary = base_path + "single_variable_gpl.ko";
+	  const corpus_sptr&	 corpus = assert_symbol_count(binary, 0, 1);
+	  const elf_symbol_sptr& symbol =
+	      corpus->lookup_variable_symbol("exported_variable_gpl");
+	  REQUIRE(symbol);
+	  CHECK(!corpus->lookup_function_symbol("exported_variable_gpl"));
+	  CHECK(symbol == corpus->lookup_variable_symbol(*symbol));
+	  CHECK(symbol != corpus->lookup_function_symbol(*symbol));
+	}
+
+	GIVEN("a binary with one function and one variable (GPL) exported")
+	{
+	  const std::string  binary = base_path + "one_of_each.ko";
+	  const corpus_sptr& corpus = assert_symbol_count(binary, 2, 2);
+	  CHECK(corpus->lookup_function_symbol("exported_function"));
+	  CHECK(!corpus->lookup_variable_symbol("exported_function"));
+	  CHECK(corpus->lookup_function_symbol("exported_function_gpl"));
+	  CHECK(!corpus->lookup_variable_symbol("exported_function_gpl"));
+	  CHECK(corpus->lookup_variable_symbol("exported_variable"));
+	  CHECK(!corpus->lookup_function_symbol("exported_variable"));
+	  CHECK(corpus->lookup_variable_symbol("exported_variable_gpl"));
+	  CHECK(!corpus->lookup_function_symbol("exported_variable_gpl"));
+	}
+      }
+    }
+}
