diff mbox series

[2/2] tests: Add kernel symtab test suite

Message ID 20200518115014.225405-2-maennich@google.com
State Committed
Headers show
Series [1/2] tests: Add symtab test suite | expand

Commit Message

Matthias Maennich May 18, 2020, 11:50 a.m. UTC
Add (Catch based) test suite to test kernel symbol table (ksymtab)
reading through the result persisted in abigail::corpus.

The test cases are created through simple kernel module C source files
targeting the desired properties ((gpl) exported / local functions /
variables). The kernel binaries are built without debug information to
keep them reasonably small and reproducible. That is just enough
sufficient to analyze ksymtabs. The Makefile that comes with them
recreates the test cases from the sources, given a kernel source tree
with the appropriate version, e.g.

   make KDIR=/path/to/4.14

This covers ksymtab reading and ensuring we detect the kernel binary
correctly. The kernel versions are selected based on features introduced
into the Linux kernel that affect the ksymtab representation.

 - Linux v4.14 - reasonably old kernel to start with (actually v4.14.180)
 - Linux v4.19 - first version having position relative relocations
		 (PREL) in ksymtab entries on some platforms
		 (actually v4.19.123)
 - Linux v5.4  - first version having symbol namespaces (actually v5.4.41)
 - Linux v5.6  - latest released stable kernel as of writing (actually v5.6.13)

	* tests/data/Makefile.am: add new test data for runtestsymtab
	* tests/data/test-symtab/kernel-4.14/Makefile: New test case makefile.
	* tests/data/test-symtab/kernel-4.14/empty.c: Likewise.
	* tests/data/test-symtab/kernel-4.14/one_of_each.c: Likewise.
	* tests/data/test-symtab/kernel-4.14/single_function.c: Likewise.
	* tests/data/test-symtab/kernel-4.14/single_function_gpl.c: Likewise.
	* tests/data/test-symtab/kernel-4.14/single_variable.c: Likewise.
	* tests/data/test-symtab/kernel-4.14/single_variable_gpl.c: Likewise.
	* tests/data/test-symtab/kernel-4.14/empty.ko: New test data.
	* tests/data/test-symtab/kernel-4.14/one_of_each.ko: Likewise.
	* tests/data/test-symtab/kernel-4.14/single_function.ko: Likewise.
	* tests/data/test-symtab/kernel-4.14/single_function_gpl.ko: Likewise.
	* tests/data/test-symtab/kernel-4.14/single_variable.ko: Likewise.
	* tests/data/test-symtab/kernel-4.14/single_variable_gpl.ko: Likewise.
	* tests/data/test-symtab/kernel-4.19/Makefile: New test case makefile.
	* tests/data/test-symtab/kernel-4.19/empty.c: Likewise.
	* tests/data/test-symtab/kernel-4.19/one_of_each.c: Likewise.
	* tests/data/test-symtab/kernel-4.19/single_function.c: Likewise.
	* tests/data/test-symtab/kernel-4.19/single_function_gpl.c: Likewise.
	* tests/data/test-symtab/kernel-4.19/single_variable.c: Likewise.
	* tests/data/test-symtab/kernel-4.19/single_variable_gpl.c: Likewise.
	* tests/data/test-symtab/kernel-4.19/empty.ko: New test data.
	* tests/data/test-symtab/kernel-4.19/one_of_each.ko: Likewise.
	* tests/data/test-symtab/kernel-4.19/single_function.ko: Likewise.
	* tests/data/test-symtab/kernel-4.19/single_function_gpl.ko: Likewise.
	* tests/data/test-symtab/kernel-4.19/single_variable.ko: Likewise.
	* tests/data/test-symtab/kernel-4.19/single_variable_gpl.ko: Likewise.
	* tests/data/test-symtab/kernel-5.4/Makefile: New test case makefile.
	* tests/data/test-symtab/kernel-5.4/empty.c: Likewise.
	* tests/data/test-symtab/kernel-5.4/one_of_each.c: Likewise.
	* tests/data/test-symtab/kernel-5.4/single_function.c: Likewise.
	* tests/data/test-symtab/kernel-5.4/single_function_gpl.c: Likewise.
	* tests/data/test-symtab/kernel-5.4/single_variable.c: Likewise.
	* tests/data/test-symtab/kernel-5.4/single_variable_gpl.c: Likewise.
	* tests/data/test-symtab/kernel-5.4/empty.ko: New test data.
	* tests/data/test-symtab/kernel-5.4/one_of_each.ko: Likewise.
	* tests/data/test-symtab/kernel-5.4/single_function.ko: Likewise.
	* tests/data/test-symtab/kernel-5.4/single_function_gpl.ko: Likewise.
	* tests/data/test-symtab/kernel-5.4/single_variable.ko: Likewise.
	* tests/data/test-symtab/kernel-5.4/single_variable_gpl.ko: Likewise.
	* tests/data/test-symtab/kernel-5.6/Makefile: New test case makefile.
	* tests/data/test-symtab/kernel-5.6/empty.c: Likewise.
	* tests/data/test-symtab/kernel-5.6/one_of_each.c: Likewise.
	* tests/data/test-symtab/kernel-5.6/single_function.c: Likewise.
	* tests/data/test-symtab/kernel-5.6/single_function_gpl.c: Likewise.
	* tests/data/test-symtab/kernel-5.6/single_variable.c: Likewise.
	* tests/data/test-symtab/kernel-5.6/single_variable_gpl.c: Likewise.
	* tests/data/test-symtab/kernel-5.6/empty.ko: New test data.
	* tests/data/test-symtab/kernel-5.6/one_of_each.ko: Likewise.
	* tests/data/test-symtab/kernel-5.6/single_function.ko: Likewise.
	* tests/data/test-symtab/kernel-5.6/single_function_gpl.ko: Likewise.
	* tests/data/test-symtab/kernel-5.6/single_variable.ko: Likewise.
	* tests/data/test-symtab/kernel-5.6/single_variable_gpl.ko: Likewise.
	* tests/data/test-symtab/kernel/Makefile: New test case source file.
	* tests/data/test-symtab/kernel/empty.c: Likewise.
	* tests/data/test-symtab/kernel/one_of_each.c: Likewise.
	* tests/data/test-symtab/kernel/single_function.c: Likewise.
	* tests/data/test-symtab/kernel/single_function_gpl.c: Likewise.
	* tests/data/test-symtab/kernel/single_variable.c: Likewise.
	* tests/data/test-symtab/kernel/single_variable_gpl.c: Likewise.
	* tests/test-symtab.cc: New test case to test kernel symtabs.

Signed-off-by: Matthias Maennich <maennich@google.com>
---
 tests/data/Makefile.am                        |  75 +++++++++++++-
 tests/data/test-symtab/kernel-4.14/Makefile   |   1 +
 tests/data/test-symtab/kernel-4.14/empty.c    |   1 +
 tests/data/test-symtab/kernel-4.14/empty.ko   | Bin 0 -> 2136 bytes
 .../test-symtab/kernel-4.14/one_of_each.c     |   1 +
 .../test-symtab/kernel-4.14/one_of_each.ko    | Bin 0 -> 3512 bytes
 .../test-symtab/kernel-4.14/single_function.c |   1 +
 .../kernel-4.14/single_function.ko            | Bin 0 -> 2744 bytes
 .../kernel-4.14/single_function_gpl.c         |   1 +
 .../kernel-4.14/single_function_gpl.ko        | Bin 0 -> 2760 bytes
 .../test-symtab/kernel-4.14/single_variable.c |   1 +
 .../kernel-4.14/single_variable.ko            | Bin 0 -> 2744 bytes
 .../kernel-4.14/single_variable_gpl.c         |   1 +
 .../kernel-4.14/single_variable_gpl.ko        | Bin 0 -> 2760 bytes
 tests/data/test-symtab/kernel-4.19/Makefile   |   1 +
 tests/data/test-symtab/kernel-4.19/empty.c    |   1 +
 tests/data/test-symtab/kernel-4.19/empty.ko   | Bin 0 -> 2264 bytes
 .../test-symtab/kernel-4.19/one_of_each.c     |   1 +
 .../test-symtab/kernel-4.19/one_of_each.ko    | Bin 0 -> 3648 bytes
 .../test-symtab/kernel-4.19/single_function.c |   1 +
 .../kernel-4.19/single_function.ko            | Bin 0 -> 2872 bytes
 .../kernel-4.19/single_function_gpl.c         |   1 +
 .../kernel-4.19/single_function_gpl.ko        | Bin 0 -> 2896 bytes
 .../test-symtab/kernel-4.19/single_variable.c |   1 +
 .../kernel-4.19/single_variable.ko            | Bin 0 -> 2872 bytes
 .../kernel-4.19/single_variable_gpl.c         |   1 +
 .../kernel-4.19/single_variable_gpl.ko        | Bin 0 -> 2896 bytes
 tests/data/test-symtab/kernel-5.4/Makefile    |   1 +
 tests/data/test-symtab/kernel-5.4/empty.c     |   1 +
 tests/data/test-symtab/kernel-5.4/empty.ko    | Bin 0 -> 2336 bytes
 .../data/test-symtab/kernel-5.4/one_of_each.c |   1 +
 .../test-symtab/kernel-5.4/one_of_each.ko     | Bin 0 -> 3720 bytes
 .../test-symtab/kernel-5.4/single_function.c  |   1 +
 .../test-symtab/kernel-5.4/single_function.ko | Bin 0 -> 2944 bytes
 .../kernel-5.4/single_function_gpl.c          |   1 +
 .../kernel-5.4/single_function_gpl.ko         | Bin 0 -> 2968 bytes
 .../test-symtab/kernel-5.4/single_variable.c  |   1 +
 .../test-symtab/kernel-5.4/single_variable.ko | Bin 0 -> 2944 bytes
 .../kernel-5.4/single_variable_gpl.c          |   1 +
 .../kernel-5.4/single_variable_gpl.ko         | Bin 0 -> 2968 bytes
 tests/data/test-symtab/kernel-5.6/Makefile    |   1 +
 tests/data/test-symtab/kernel-5.6/empty.c     |   1 +
 tests/data/test-symtab/kernel-5.6/empty.ko    | Bin 0 -> 2336 bytes
 .../data/test-symtab/kernel-5.6/one_of_each.c |   1 +
 .../test-symtab/kernel-5.6/one_of_each.ko     | Bin 0 -> 4040 bytes
 .../test-symtab/kernel-5.6/single_function.c  |   1 +
 .../test-symtab/kernel-5.6/single_function.ko | Bin 0 -> 3024 bytes
 .../kernel-5.6/single_function_gpl.c          |   1 +
 .../kernel-5.6/single_function_gpl.ko         | Bin 0 -> 3048 bytes
 .../test-symtab/kernel-5.6/single_variable.c  |   1 +
 .../test-symtab/kernel-5.6/single_variable.ko | Bin 0 -> 3024 bytes
 .../kernel-5.6/single_variable_gpl.c          |   1 +
 .../kernel-5.6/single_variable_gpl.ko         | Bin 0 -> 3048 bytes
 tests/data/test-symtab/kernel/Makefile        |  19 ++++
 tests/data/test-symtab/kernel/empty.c         |   0
 tests/data/test-symtab/kernel/one_of_each.c   |  16 +++
 .../data/test-symtab/kernel/single_function.c |   7 ++
 .../test-symtab/kernel/single_function_gpl.c  |   7 ++
 .../data/test-symtab/kernel/single_variable.c |   7 ++
 .../test-symtab/kernel/single_variable_gpl.c  |   7 ++
 tests/test-symtab.cc                          |  94 +++++++++++++++++-
 61 files changed, 256 insertions(+), 4 deletions(-)
 create mode 120000 tests/data/test-symtab/kernel-4.14/Makefile
 create mode 120000 tests/data/test-symtab/kernel-4.14/empty.c
 create mode 100644 tests/data/test-symtab/kernel-4.14/empty.ko
 create mode 120000 tests/data/test-symtab/kernel-4.14/one_of_each.c
 create mode 100644 tests/data/test-symtab/kernel-4.14/one_of_each.ko
 create mode 120000 tests/data/test-symtab/kernel-4.14/single_function.c
 create mode 100644 tests/data/test-symtab/kernel-4.14/single_function.ko
 create mode 120000 tests/data/test-symtab/kernel-4.14/single_function_gpl.c
 create mode 100644 tests/data/test-symtab/kernel-4.14/single_function_gpl.ko
 create mode 120000 tests/data/test-symtab/kernel-4.14/single_variable.c
 create mode 100644 tests/data/test-symtab/kernel-4.14/single_variable.ko
 create mode 120000 tests/data/test-symtab/kernel-4.14/single_variable_gpl.c
 create mode 100644 tests/data/test-symtab/kernel-4.14/single_variable_gpl.ko
 create mode 120000 tests/data/test-symtab/kernel-4.19/Makefile
 create mode 120000 tests/data/test-symtab/kernel-4.19/empty.c
 create mode 100644 tests/data/test-symtab/kernel-4.19/empty.ko
 create mode 120000 tests/data/test-symtab/kernel-4.19/one_of_each.c
 create mode 100644 tests/data/test-symtab/kernel-4.19/one_of_each.ko
 create mode 120000 tests/data/test-symtab/kernel-4.19/single_function.c
 create mode 100644 tests/data/test-symtab/kernel-4.19/single_function.ko
 create mode 120000 tests/data/test-symtab/kernel-4.19/single_function_gpl.c
 create mode 100644 tests/data/test-symtab/kernel-4.19/single_function_gpl.ko
 create mode 120000 tests/data/test-symtab/kernel-4.19/single_variable.c
 create mode 100644 tests/data/test-symtab/kernel-4.19/single_variable.ko
 create mode 120000 tests/data/test-symtab/kernel-4.19/single_variable_gpl.c
 create mode 100644 tests/data/test-symtab/kernel-4.19/single_variable_gpl.ko
 create mode 120000 tests/data/test-symtab/kernel-5.4/Makefile
 create mode 120000 tests/data/test-symtab/kernel-5.4/empty.c
 create mode 100644 tests/data/test-symtab/kernel-5.4/empty.ko
 create mode 120000 tests/data/test-symtab/kernel-5.4/one_of_each.c
 create mode 100644 tests/data/test-symtab/kernel-5.4/one_of_each.ko
 create mode 120000 tests/data/test-symtab/kernel-5.4/single_function.c
 create mode 100644 tests/data/test-symtab/kernel-5.4/single_function.ko
 create mode 120000 tests/data/test-symtab/kernel-5.4/single_function_gpl.c
 create mode 100644 tests/data/test-symtab/kernel-5.4/single_function_gpl.ko
 create mode 120000 tests/data/test-symtab/kernel-5.4/single_variable.c
 create mode 100644 tests/data/test-symtab/kernel-5.4/single_variable.ko
 create mode 120000 tests/data/test-symtab/kernel-5.4/single_variable_gpl.c
 create mode 100644 tests/data/test-symtab/kernel-5.4/single_variable_gpl.ko
 create mode 120000 tests/data/test-symtab/kernel-5.6/Makefile
 create mode 120000 tests/data/test-symtab/kernel-5.6/empty.c
 create mode 100644 tests/data/test-symtab/kernel-5.6/empty.ko
 create mode 120000 tests/data/test-symtab/kernel-5.6/one_of_each.c
 create mode 100644 tests/data/test-symtab/kernel-5.6/one_of_each.ko
 create mode 120000 tests/data/test-symtab/kernel-5.6/single_function.c
 create mode 100644 tests/data/test-symtab/kernel-5.6/single_function.ko
 create mode 120000 tests/data/test-symtab/kernel-5.6/single_function_gpl.c
 create mode 100644 tests/data/test-symtab/kernel-5.6/single_function_gpl.ko
 create mode 120000 tests/data/test-symtab/kernel-5.6/single_variable.c
 create mode 100644 tests/data/test-symtab/kernel-5.6/single_variable.ko
 create mode 120000 tests/data/test-symtab/kernel-5.6/single_variable_gpl.c
 create mode 100644 tests/data/test-symtab/kernel-5.6/single_variable_gpl.ko
 create mode 100644 tests/data/test-symtab/kernel/Makefile
 create mode 100644 tests/data/test-symtab/kernel/empty.c
 create mode 100644 tests/data/test-symtab/kernel/one_of_each.c
 create mode 100644 tests/data/test-symtab/kernel/single_function.c
 create mode 100644 tests/data/test-symtab/kernel/single_function_gpl.c
 create mode 100644 tests/data/test-symtab/kernel/single_variable.c
 create mode 100644 tests/data/test-symtab/kernel/single_variable_gpl.c

Comments

Dodji Seketeli May 27, 2020, 9:15 a.m. UTC | #1
Matthias Maennich <maennich@google.com> a écrit:

[...]

> +++ b/tests/data/Makefile.am

[...]

> +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 \

These files are not present in the source distribution so listing them
here makes 'make distcheck' to fail, obviously.  So I removed them from
here.

[...]

> 	* tests/data/Makefile.am: add new test data for runtestsymtab
> 	* tests/data/test-symtab/kernel-4.14/Makefile: New test case makefile.
> 	* tests/data/test-symtab/kernel-4.14/empty.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/one_of_each.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/single_function.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/single_function_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/single_variable.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/single_variable_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/empty.ko: New test data.
> 	* tests/data/test-symtab/kernel-4.14/one_of_each.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/single_function.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/single_function_gpl.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/single_variable.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.14/single_variable_gpl.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/Makefile: New test case makefile.
> 	* tests/data/test-symtab/kernel-4.19/empty.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/one_of_each.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/single_function.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/single_function_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/single_variable.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/single_variable_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/empty.ko: New test data.
> 	* tests/data/test-symtab/kernel-4.19/one_of_each.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/single_function.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/single_function_gpl.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/single_variable.ko: Likewise.
> 	* tests/data/test-symtab/kernel-4.19/single_variable_gpl.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/Makefile: New test case makefile.
> 	* tests/data/test-symtab/kernel-5.4/empty.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/one_of_each.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/single_function.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/single_function_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/single_variable.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/single_variable_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/empty.ko: New test data.
> 	* tests/data/test-symtab/kernel-5.4/one_of_each.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/single_function.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/single_function_gpl.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/single_variable.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.4/single_variable_gpl.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/Makefile: New test case makefile.
> 	* tests/data/test-symtab/kernel-5.6/empty.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/one_of_each.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/single_function.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/single_function_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/single_variable.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/single_variable_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/empty.ko: New test data.
> 	* tests/data/test-symtab/kernel-5.6/one_of_each.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/single_function.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/single_function_gpl.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/single_variable.ko: Likewise.
> 	* tests/data/test-symtab/kernel-5.6/single_variable_gpl.ko: Likewise.
> 	* tests/data/test-symtab/kernel/Makefile: New test case source file.
> 	* tests/data/test-symtab/kernel/empty.c: Likewise.
> 	* tests/data/test-symtab/kernel/one_of_each.c: Likewise.
> 	* tests/data/test-symtab/kernel/single_function.c: Likewise.
> 	* tests/data/test-symtab/kernel/single_function_gpl.c: Likewise.
> 	* tests/data/test-symtab/kernel/single_variable.c: Likewise.
> 	* tests/data/test-symtab/kernel/single_variable_gpl.c: Likewise.
> 	* tests/test-symtab.cc: New test case to test kernel symtabs.
>
> Signed-off-by: Matthias Maennich <maennich@google.com>
  Acked-by: Dodji Seketeli <dodji@redhat.com>

Applied to master, thanks!

Cheers,
diff mbox series

Patch

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
literal 2136
zcmeHI&1w`u5U$;czmZ^2K@edN;?H55-8JAwSXtS`5HO1#7DUluemdD9J3TSeD+wNa
z1YaTGF?Y{7c=PVrSMUk6YNm^A+ldI~;K62^s`|RVs-B*%ns=*@AJuC$;8BAIFtZp1
zcy?;0_Y1WT7hoRdP``}R!?`vb!RF`W#n;yl^Xs2Bo*y0_9DMj#-yru`?no8qJy1a^
zdotb8`|w8YromPc^_D~%pKhx`o+mTP3?~!of0Tdt1l9(F`;FTxGE4&1SQZ`8Zg#qN
zO0Cgpbz1n`#k=`uZohp|ud*`e?$;}MUQrdlE_p@ORN+>US<4=rwyc@z!I_z1X&#)l
ztWu?#o`Y}S-Gy_<;8zf@S^FnH8aHtg&h~tP0xTPxdI60~rGO_W7r}ZjKB}TXMFgcx
zvlw;XM>(BH-*gKEM#J@|qg8)>#iz#6?*0UE18LtwSdWw3@Bu`=pXwk)sdq~`W=&;U
ziY+x2;WU}V%_Ih)<(>wCxf8XSfrtYgK;be;)OMyKDeT}P%ySS?mZnl6t%!%MubJy0
z+BUEK*WwyRps&lv#R2<9xxs*u)Q9aM(4cSb-kjKWvUIoSFB!g@e{49nEH0_;jq4#s
zG3mcxkN37=>2Cf3u2u1mnB#1$&$y8<QPQ5={6`LtX>R@y7YJ*ygOSW1Iym!L(nVn1
zc3p5cWENdtva7aw(eTHHa31{@aPs+IHSwrEt5WTmi}K3&v2gP*9>f1)_-~nLq|5&S
D`b36g

literal 0
HcmV?d00001

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
literal 3512
zcmeHJ%}*0i5TCN3;CGQ2zta#+@W9$uj9>z30*E98^?-?9)@{4c4ec(r3t~K&c=2ZN
z;?+bC9`)j1fQerD3pC*`(6fooyq(!yUbloqPsW$-&dl%4$J=@H=Jo0H+>NeG24rMl
z0%A!}fc3tZFDbSJSvUsW$PeIS;4?G70MDLm_q_S~b8Fzo$G6`GKN;oTi-Vh+o66#E
zyqxtFzZp1HYt3%DcDe3YODlC~Lt|ud)vE-q@9oqR6spdO<5gSZ;Moml-1i*IU$h*%
zQiC<8*|3+~%J_&`z~5*-N9*sxhw_t_Bbt|y^d#7S`VVGcW^(d+ZfMFWySA4bGmB<n
zxHx(#<Z{J)F^|71csBN?wrhfn4pnEUs%$qk)TvCvd)h%n4A|cR@9lsmnnFUufCC9B
zW(_zP3klAELkTHn4LBSN%+a~)hVQ@hiK7T)pa(lrID}qSc>G-_c>b2cjW+#d))&2g
z)_<<>IB(+r9qSLVp4fd>ICaHvi2gQ;8O-wp<Kmw_DDAtl_`w;7^Dh}6WL)Gd`@72c
zX_k*OokKjE+!tzOI8Nb{g+A5CNv3{I<38&5V_mUYRC)Jsj`U?kqQ8YW>B~TKHD2PI
zaFK<&$dDfy;s+9q)2x7HEw>&w0=sOrwRqLgX+CJ~KHtG!`R-tw7FVu}PI24jwYV~$
z7B`wpetpBQsth1q#e0r#Dl}i1pS`m%ZOu+ubZHevcR+G&6|Ny1)ZCU8+C$y1*mWz4
z6pC_-$~LHdIu}V0?KABgRln4&)HC5{6Z$8a7kxPoqC)t25s*q9iN2hpq<^VpGSmG>
zuFSAbzzpjFX-zoK4;*vJTQ$q8ZoN9}R>2IM^#IJKQ@5iE)5K_-!)-)guD8?z6SL`h
zi$0iDJFr2yt-Ic`?^PT#nQpV(LhXv*XgD5*Qft6JNW-nbu27Tt!*K@fsjI~&E_7H5
z30z<*BsyOVm`Ew-`$U0hm1*3$LV$FWV+;kt^!O{Rlw&GH_EY2$WN1w#0hso3K|Emj
z2vS;$)QRl>O~lgTZ?IjCsSrK>Bu=EoucgGNy4U01MJz4;2M&0fsSrJXwGQ^mDb5Xx
zAybJj@Iz$Cr@l{l4y50x`u;!aU|*7jY8zWZ{p6s&PHWQRmvn%Q#I5*vg$!YN0ho&Y
zyoQUt(APLGd{Xtr9^;d(_KC{PhS)Qu{}pscO8%w(=;jhtWyr4$K2Yo0;xrNOzI6L9
M9O!-0De}7gZx<*+kN^Mx

literal 0
HcmV?d00001

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
literal 2744
zcmeHIOKTKC5boWH?^hBP6fx|<Lp)^MT>~aUWFd(mD2pBz1R>+>OlLD>b|&o1hUDM_
z#G60BgZ==$c=6&f<l?~}A%Z`^o8UpKda8Chy`u=`;K62ltLm#qS66q}JYKwgvs@|(
z9wl)@<PxJod^?!)4aGLZDREMa0DlIi1#_v{5<3&G?ytOiyL0~G_wws_`^)U-@~7Qh
z<xu!1w>IKlDt%|QA9-mIM`Y#84H@~#oQT}6oJ)eJ6Uy9XQ}()UC-CN`?Hc@MsugrA
zlka{IbH)9L`9H=#Sb?Sa`RkR*1=$YVs4{EU?b=j*=5oeW>eYG`eplgc|C!luH)s{U
zEPOk~H`h|HYB;1N4h(~USVDWGnuR3}X;RKw;&3i#oF$HEQqEf9Xf9}+C5~xQ#$pc{
z5nq3piqim;w0(_|!4-w)`x+<w7SN(NuCmYf%Nh3wXZb9}c}DmI$(RR@moUflI?z$P
z0el?Jg?k~>i-ZGFgYowujcIkpzNm)LNNi6y&U&)lP2ILL-270N_KJ08q;Bl1Xh8eW
z9I0bM_*QfIZfnt5UU0B^)@JrV+&XL508ZC}#L4_c7<+D*x7bYFbbEo@4khnK)dTxI
z557TIhrymvX=i%`s`dkPjkzdJrQM18cDo;h{#4)#JC$3huzNCe2i4K)1di|lNQ4ck
z2GMFPY~M{?p<;wVv>r#EwDrB%?F6j7xZ9Nx#8nHz*J&zAU2mOJ|0{X{yzy0;FSkKa
zFA-(3r#1lEFtKL&4bCk6j10x)dq!$83k+iB`Ws}x?~3hBc^VX$Q-ckNPEtZul8*z$
zZ#$p!Il||G7Onq;^!$EFRJP0`ZNV(^e?dkyqD**wmREp5f6PrEA4xFlZOT~ZBL6|6
zMqwNJBEUa_i8-0;4+EJauBDHsARxwd9_T1wa{y!v`!jtGF!Q=;b10#`{%niB#uk<8
s4*8Fg@&urGmRx^6f9$VCOFf_#{y{~{|IA#+e&K(Q?jQDLeVG0~0VR#qV*mgE

literal 0
HcmV?d00001

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
literal 2760
zcmeHIy>HV%6u;C3%6D531;G#y0}MGOX;D+8prE!y6)1wCLQJk>UlS{i9b%^{VgPkP
zEQkdOiG@D^iH(7gPHeECF8mSv1@P|tUe0w~gir?tPPX5BzxR1x&rg=`+#1W}7>yje
z!L&puV-troUsG(2on$B2IPj<8HQ=o`R@wU<_j%{d*PGwJ%|4zfe0cHc_J!^3ZRL>p
z5u3fB9|^}?ANY3U2EN(qd0^>?p75Qp%6zLUs-f$*Jh9tmL-e~=%eAX>yaZ3Bn3oC0
z<Yym7R>pk@`#;3LwgUCV#q0SiOQPvoetv<Md8tsYT#dPWxmYg3GYe<?&&+;1J0tUE
z$-9$%Y7KR(Mnf9xz$gfa!4B?$CoXTo!eA2#NwWq!tc3(;up<dcvj#h=1>|H88D~F!
zrWG>)<P!6mM1y&S>v^3){65gEI1iP*o-b9rg*eIQFwQH)FQI%2={ulP$#uZ3_z3tk
z><jfmq8AZI_o4o?ilf(A_C+-^8VR?VX?DU#-N<U1*$q(YqyFCdtf<|<QIUZTpjl!E
zg;cAJm3ynp=E{;On`x=C3!*k!ng=*)yP+BTGcT|$Z`g8C+_3tt)$|0-PR(ETe;Rb6
z;{7KSD39k0RLu)$n>as+1aJ8R-W<4|Q*a%|Be5AV-WQ&wS4#dEv;@xZQwSM{a$SEt
zVBE1Hi>WxC>vsa*7Cbp0-VDLo4!T|8Lu{24{#b=Dvg}Tx(7$8PgPYv_^i8f|xXVb1
z49^Dw9H?9~eWGK9gZgw_I*+Jk3&2P$ZP!Bsx@TmcmghhrYpRg}(h3$-MEMv{`LCya
zK8tuAXjcBGsHgjkqOv7k(g*Nn`M*Y^Ye<Puev+HONPk&da(qD{z20fL4R%@n!$MOF
zTT3PZehXe%Q#$`B5If3T$?*&XiP1U_br`TQ1Y(B#iM|Aw_@rrLq@dmYWGj7BQ&g(E
r=s$_d<A6@XOY2YjFZ*p)sx@rsJ1Uy~q-&kp!@rH^@2z%KT-yH^v@+sv

literal 0
HcmV?d00001

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
literal 2744
zcmeHIPixdr5PxgxzxuDO3W_L;h}1*l?pm-FDhq8bMOpN)(1RGW$!i;$O-hn2^`e4!
z5kG*3o;~;t#G@AvUOnlTC|K~OGs#Ty`jU$ECivL5GxM97H}mGbH+eRH@6Lf*P4K9R
z+oF&d72?OCf^Vm6TbvRn#SrjkU>YzNI$aT-|F#r;x%%+y_Yd*b<+nS-+pl&$ruNl;
za&tY566snScI4STUy_+C*Ja?wGa|72awhhI6<-!M8#3zKE1okmX*S_E)u^M}0hm>}
zqi(-LkGNm||Mve#1r}y!Z`H@=WY4pM`n1_Hn-i_6YZ+H>HChe$-GICOXJ)_Mw6VwS
zG}4<}b~VyhRfQicgMb)9d8CSkAr322!5ZR7At;<7jw({Y8e+H*6wVOG6e(lz9S(`@
zpSt2S05xS_BV=$r#fyE75q=kF)jD=+U+kANjtFP@EUojB@Jl3P9yqpOj;eLQCIaIf
z%rWI$xUXCUd=%=5eGdoI_rN30gK?oX64McuwH80=Cw9*&H$T)RQMFEAsUN!OYCs3j
z9I0c%^4-qjgYLYwIA>w=Y)<WhxOFyf0-UURv6cA?KXh#0S{?*W;)MZ;T362cEB1RH
ze1o#{W)!HI?Gb3YAE2wu1z{r1m0)1@2A=Ouc&;!LxtRzvlD?f+N2wDy!UrH0CZy^G
z%b_q`JF!K&hVKPyVc<wp-HX|a!P*J?eHp;IX+ZcoO~i@qtSL$UJ$nIM@wDl><O{Wl
zyOJXrlivrzO`uq_;s$35m-Kw!NGx@ZX;7ez9)F!2_+7ETE>D62b852z(Q!(sLGp2+
z_-*HNK1cX0(5m>)Nzd<>#8Up<J^bI0Lz5kea(sp#0fX@|H+6g_LATfIk9Dr{&lA-O
z+g5`B{}d+1(BqeZ%n@U$;{^zaah-D=E!fF{jA4JKuK{LWHSLrV+U?J_=&NlpRoy55
p5mKH26wi|D$>)##wJOwOYT=*K)rvno*U>%vm+1asUsi|i{|ht+)WiS)

literal 0
HcmV?d00001

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
literal 2760
zcmeHIJ8u&~5MJj32?>w~5f9NAL;*!swh4-Z2(pxyA|V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ernel-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
literal 2264
zcmeHIPiqrV5TEVVe`rgK9t1&h5Y$5+$+n0sMpoKb110Jqpm<m|+1GS!_NDD^v;{#C
z#H+{N1TPAH1TXzCUOo5;>dfvN`+Qj?;7M@E?#%nm{N8(+%uHT3*Y8d_4zM_I8;)0u
z0vwz;w*B1nVFu2@G};&Naq(GecVMU4KMFtG+IjN$&b#-opMLxD`RkjL=*#!S*Lti*
zd$?wa<hE2%+5i<MvLTc0Y#*M<-6ZVCy~d)bFNwOhP~qswb+Oar@&6<L(G0AutSncq
zt;%j3s>+h^M7`?Wyk1xpujbY8vw*cZS=b+w;Ffj<)&5i|&&|7H+~ww7Q-&K&X1HCT
z4jLC1PK|?zxN!P6_?a=B`f?h+AK8u>1RUd@%)G2|UZ2&(y2fc1ken|R+(Ydc`MId^
z2dK-=eT4YD`F%OHc|(h27>OPP0qW5}26}oR&}p|GcA7zJHK0M_)qjC_pm;S1)G(95
z4Jfvwt+LHH)%yX6bU(?$F6wNz(3@-#QS{YFbVu<Zs>TtB94aQ7$mCuIbiY__3_(O;
z7D66Ah}G6m^`tNl65TWf(Hka-R7lG=!tq&6v#__NQ}kEr60)f}IDNdCuZ=4VXian6
z6oHE}ex!r=cVv#uUq%PjmR-3om|*Gr|G~g~v<b8C{|YgZtA+acwky7c9^%vgk|`g}
zg<;$0-$!2=|ByM>#eBxKj#1N{?DG#T9@Fge6*>s3ae&s$Z(BI?SwBZV+h*vjeIf0%
xV`*J>)j7>S&;;uLIea+(To*JS%8vS^3uOcSrr77tqqB@Zt4HKplZ>{_{{bw_k_7+&

literal 0
HcmV?d00001

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
literal 3648
zcmeHJ&1)1{5U;U=U+b#TAj>N596V$XdCZKWiI~t3vq6yffpL#*&vYkgGSeMrdO`$c
z1AAY>o>vgTy$JpTdJuB)k8lrO_N+HAqE)Y}dR|`lM8TU_Oixw)>g#pAul{51>Ti20
z6%eYx3=A|u0bU*$$gUP$I0mCIg7O$X4nFe>i|}{l>4#_Y|J83^dhurR)$cQR-i$xl
zi#DAT|E@-He*<-*?d|PM*yTUmSWCKT7<lV`H}ae9&|6+>LjfHiOZ~W&MoGNWPf!TL
zwJ;8P(-8Zea5{-YFIn<JzqJDEVYlNiN3H2|sy?Oajk8r6)*gIl>}5S6`!F&y5A*qs
ze*+zupPju}9lsnlBR{TAsfMagG$wz|q-vwqsNwG{?u{>V+qEIikX7jDRay*n^sX$!
zY1bCX0otiWa$tWEM8pB(P%u0kIA~}C(SaWZiXl00$j}C&13wNFLvrA-p=BcN&k=a{
z(KZ}Mpkj<uMtp{G(MLJ(0^>ikPVqzw_*9HO|D;iX+sMo62HIZi^CsdI?B|TO1D>H7
z{i9j2|1S_H|8e#^!Th!6BZZlH&;H^k`N#ADwzuGa4spsaByqP8A2sKT4nm~U8b7Gd
zebVI(n}{F76~S(pGo$~JjpBNc3gRClPX0pT|1aaB3%`p3<q?uRU>vlnlLV>-o`<}T
zHwB;d2rMpKxv@CsUAgShvEQigfaKtB)WD0AH1y8zNJ<G;d-po2-}Lf(C%;d~mUf5R
zhQ#UHX_wgCZpF(jsK;d0-C-LNm**W4%l337>TwsLowWS6m%nhP=Cx!#Xx@Jj1-Z-*
z;k2q{y~{cv{4_p7asr6ItV6LAUKItoonQ8cng5jGZ|BcVDw|qR*)$?w5s4OqT8{gw
z*^k=6L==G1Q1%U@(r_aM)eYNzzCbKB?{+pDm^X@-dqC?nikA{lfuH)IOSGeSHHllH
zGFz{jJ@jrRolY2IDP0^tvL<?|-&)Pz;H!j_7`+c4>aR&ID`!j)W$C-X3Wc)xfF0zV
z6n{JZA{uCq+b7?B4j7ye86f8Yn_&(G!tC*Hvcpm4!eo7j?xH|rB5sn)j&~S5f}H#$
zUf$~#VrBKWIPP=xuW??N{e?X$sZTw!>o*ZAtN(}-U1u)L?q7<AviP?gFd>1=rM|!q
zP@s5wo~m3(_MQ0K^Z)0Ncvl8$O{^=4m_I~LW3ubJHo*RpmQ{F+0%0`)m`gm}`zA@e
z@TX`L+4TGC3+q#?^@=*p7RT3^(>kKPD*c!BN8c}HrC#!e+O!5|sd%TB$IB<vbF`ae
G$A1Djo=!pl

literal 0
HcmV?d00001

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
literal 2872
zcmeHJOKTKC5U$O{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HsJyQ

literal 0
HcmV?d00001

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
literal 2896
zcmeHJ&1=+95T9+T)^Dpt6fcX2sMyDDs$vUm7us41WoeQ1;K7hhUbmsyWZ7g(1yPTl
zM9`y$diUtngY7}D-n<C@13mZ;s58lX$=mFsh+aJSXfiXu`FQhY=S})#VfoHbsRVMB
zU<PtYq5vz0a=w<ZH8=$)VHo)_d<=XR>kas{bNSl))gOED*O|RH@$ATl`;CtWQJ2KT
z*RmJ%wos<EyPHya^Q}(Ujk#;B^#UjM!oX^Ee8gSe;ei`XLtwZ0bmRpspZD8r@^0I1
zdCv3=R-I&3bD~V~hUoPdOSjWsg!}LMuU24jZf>f4Wu7-ZJ19>wlU2vf+gDSrY*x$)
z{!L(S|DM^tr!=%Ti|&rTTaDya4Tdz5Tc^Y6rVTCwl*_BA4H!|RoHgKZE-0J<M-(Y%
z4LF($3TMDEMM_zk1H<tBXHjthfs&G^%;37frF>pE&I<gZkk1HuFTwMAo)h>3q`H0M
zL{C$!f4xGn1bIEr3iUgrqiTJ`Ry&BF#@|cMPDvjNT)1cY&q<uT{#gc^!Nc02%N(#Q
zq&*yeVkRQcs4uNH7ObUti^ii_?StfCG%H{QVa%;tpbJicH=>8_*lt?-DNOpfyPrN@
z_ac!U_@QI_*@zb6rrq`Irq5*=l8%=(B~YH9%6TBOLWZTOAx%<1x-L076l(=N*6ew{
zJMOu_5-9z~u$XVfz`ESG^8?aHC6_P|eo!Ky0(-$)2+Xx(8<Lp57i@%q!<l+E){M~F
z3EOQRVC-Z!{OXNIvF&WAS^qIl_keC|-oa_8T1w!OppwYCNtq#|^LK@Tybsd8=s$%D
z>fOBaQ_Dxfp_rHKbD@R>WC$zTJrxFd$EQG1t|3f05mi@5BvcXLainA?{pGptBBtB_
znebD4j-X=x)S){6Z8FAnGbPzu?k|A=8S<z9ht%~&2*r9AWtvAi|18l$VQcCp$Un!2
zaw_gW2&9h1^S?xxFj?o+3g04NJp)ok`b+v6Vacne^?`)?{iQAW7LJ&xR)l{|C{G|d
mhL5bj{Qc=Wq1)<(7%JaTudZUQqo~yRZ;SqWt2!fJ^#28NtnUK=

literal 0
HcmV?d00001

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
literal 2872
zcmeHJ&1=+95T9+T)>=Q>`UM5qgNJ(PV>cCPE0u+|mO@!SpcgMOyGh%$*`#c;Wd%X;
zB%<h1@Z!OPH^Kiv1aAco{uiEl@LXr!$L94VE5)1O&}3$Q^Y!NKdy_s{TD?6`DuJRB
z+=5I~D8S5#Os;XU2It@`45EA<9}A!5`WkHQ{e1Oqe|T>1SNL-L(?NIS*~GWwXyZBY
zwHid7F6u;I1><kOyA!ul-*a}|cHlNbU)nr>$B(>Z9wN8p&nH2&5&D_WuHSCC8$oma
zI;+mIsy$t%umOCEdLY|T$*gqLxc`3t*bXc&EX<WB7yU-yM&(&%v+9&Rb4^HPyJA=H
zZyL|`(cJ#nyw&GaTKvT3LoI%*ig3Dhd9r|RTAnP>F0W>`U`W$4(SnniqDdAEYg#5+
za4J(Y$$}A06C&NqLD)Yq4VMroY3o!gn3TBEFUY`~62Bt#amnv<oF;&v%aT7pUQ{>a
z_WXW6N4%u%=a|g%0r{xDKeE(k#K*MXOU<8M?mxumB&AT5zDS%fB87u7cvvg;SQ8uv
zc?U<IoQDXk)mQGVEjcTT4vj{;dI(a3(XN0K#i{Sy$R(zv+sUI=>NcGG^d(!`?q^Fk
zgG8<f!no;%&Uz<mra>G@)tKU9CSMe-9_p92@0f-I6H7wQ%Ol@Z5;ej$q7G|xg3y}^
zJYXCW-xQYm-4s~c58Ym4T8o$jKOPCth6d4k49s&=7kIufh_>UX=`+1A)=1F18Mj(~
zgn4--{K8EosoUJvSNvD<1V+)V%ucFEQxgoXO0HP%d`N&HFN*i1U7h=W@pEXPGipwZ
z$1*^jUlniaOETVE|5F)YP8L(Ip&#``T&IU}K@|y}MoxYzUiEbcF<O&ZpYAP@y01bL
zzDg$U;!_m=o{UIU!Fq31UjbVvP(1zLqtg$mnEvMPw}XB~@f@TaMq@R?G<tzD)iCSl
z0TD#Cbb5^nVQQayHkq*A1B9UB6@QDcl6BX5Zb66Rl`q8_EppRc8DEpeGl<gvmuf%N
g?@!-@qEc_<F!|22WiNBBqy6IL`TLlKa><PU4WG*2eE<Le

literal 0
HcmV?d00001

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
literal 2896
zcmeHJ&1=+95P#cLt>0F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(LFey{9t?6e{x{2j?8yKC

literal 0
HcmV?d00001

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
literal 2336
zcmeHIQEL-H5T5H*t7yT3piq>E3i^;Gy`;fbB8P1)ff^Obqa2sqwmF*Hgx*CP5c=pp
z5MTWZJ_x>uKgCD!&0nB1d%I@4cZ$?UU3xdO-^@3=oy^P~ZS6dma~#mifqO99X%yh|
zshRFe)rUnm5A&#B#K*;FyVHf~hi3imrH}XDzq@kv>%!}!?%>+^G}>fLeC@<ya)^6c
z5g&6Ar7aL)!dpBUXH$6250Y>%?zdK1gEdwv((weZJlY9}|0(}g2DUdg)+@I*c`pt{
zWsP}krRv?eoof}Z=GE}8j<x+~Zokc)TiRLFJ9DKxS9Vp=<jSrq!;L02%q~y|7MBYP
zMGz4e&in#DTfnKW=i%FT+pvg$W870SuPa>d&naS4;WSHVE#(3pqI8V>Tvm7&W!bsU
z5MMI>UtgzI4g{8rBG!i>=yuvqx?4eeGf+dwTRn!-MDiNPAU&D9Is{^r@t_HLOp2Ec
z;xxeElOYFS=`_j09?I+>mjkU4k?n~I>rLWeRE;BG63WLS%lKgibjeukj(|mB7J_si
z#$taY`ka{uv0j=2>yMIz3#7?FID@Nc7WVg5p8i%WV*siWokktcSIP|yC`sP~b1~eM
z@gwD=e^1S^`Riz)8nY|-r6yQXerF8KN1ZVH{+fT&@Fmsew-rX;H*>u;H->KWAEAvf
zoBv61e%7bnE2%|{3U#B+F9JEkK3^bASS>ft-YQ^chDc5GwS0l7)=k$=;X=99_NBd@
ud-8m&_-_<}=D-Df^yJZXL35()s4uEe>^is4r#Vu_f2v01E3})-=Klb7<B#nC

literal 0
HcmV?d00001

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
literal 3720
zcmeHJO=uKZ5U#O<KXHFd6j4`p2X+q;%_EsaQ86;0(G?`S{^TGY+Mb!tq{&QonCS@-
z6$KGIdi3H!FCM&j_ar%a5ijCVJS+&Fc43dARj;eM-@NYe2d_S6x~jhVdtLQ@`ugnY
z6YEMPkWqr8kV%39Y#h$`s%EP&3L`Lt{5JeM_&+%}4|iW*x^nivXJaqJ<$wNvs9xRq
zu;I#j)ajV`I30w&Rg`J0t*s@@S3LdI<){<;4R^)s1YWJ>yUpbm<j@RR=!Nw-h{Aq5
zL80L<`(dLy1EJUUXQI$|qXpOZ>Wi@AciLVvsL$+I(`tIM46qL8N$*iqANv)|NVe{~
z{JjEc1x_A2cDOut+^+>*SU#jGYI3}Ca8JUOD-)Fo{7vEB`ZBXLY!TxOSh<c~*?A8~
z@9H9)c71+0Ks!A@9N3r#5piJC0Ngli3=0P~8&bwP@IxjToC7}^QpP&)QzkG+dwK}|
z{a`D$B2Y5sDKp-~xX2^yc!cp?EDL^4<8*=~V+YfVNQ?3YTA#1;EyPP$&!g-=%Jjab
z`T9R)`!TlL&h(9@L%GVmXM3@e_&cdU*k8NShY+Xv$Pm8^h>sZks`9J<uJK`gZ;+3?
zVH5FDToF<s6!mzA&k-0-Gl+c`ak7^o_Kz4BS?CHf6i0@{0pp-n?Wm#Z;JWj3r_RjJ
zx~Go2d_7e5_n~xGRHpkNxh*PF;D%A`y9fFrQ`DvI<#z1V-1M?aFCo&!ox!>Re)>xL
zgm0?1{N?J@bF%XG=?3_vaR>OaK3)vEE|#>{@}U*gy_TE4a3ZF;q$x<L|Gycs^oej<
z-Lmdw9TNVlVZViWv6uBICWMzoKx)UAePYJnZP?rKQ<X}(3o7X((naBDJ*Z~bQ?*{u
zYK#XBP#Q|Ug;eaX#-KWW%S+dYC8h;W8iH|yu-OG#uR*vFfogcM2RcP72$!O;?kltU
zs@6s8dem<FA*RyF@ndbg8+-Mo^bNj=`31c<;GgPijw%a(m>}{}cYzf$Mg9#okn>XP
zZU4ilpuKLNfLGZeJ1G)C&IMM(EHZ@I^S{9cpUYoGJDL+wbKK^m@e+eSBPBaIF(vMK
z#ESCYWk0cFF;~C8P*IfsZ9#sjk)6MWSW*7RobYd^LhSm*1N?PR)a?~Vrndhz_P6`A
zj}2u%N*KHUHwXAv*}rNvwkm;`-a|??vGd=s0k*g2{{V5qCRi^-{O1H<D*i(0-V)w4
zeg1{{$=7;C9p(l5PcWtPi}tGBfBKFoOhua#$1Q7emWX$2vHzd^f%HU2$sV@<M+K2k
A+W-In

literal 0
HcmV?d00001

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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k2v$H>Bc_ym%jSlk#RQ3pU-~^G5J4LfBy2lP`1?$4U?~^SC^iv
Sd~cNbf1~@ir8*<8`~L>+9pJA3

literal 0
HcmV?d00001

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
literal 2968
zcmeHJ&1=+95T9-8_h&^!(ZeDh^w39}wxWfVg|?PLDTwssA!L(u8=Ab7O}4ZkDtMJ5
z2%_N0ix>X@doJj~iy%nxUhpRV1v-<wY2LnuQtC~7v^z7u`FQhY-^|;`Q?qybYBk_h
zgF8@4i~_tmQu585ZNgbN1O3RK$A1g|r|0Hj`-=5wJN;~rznpmYz40~v`EhIGFzWJ{
z_%R#G?kdW(Ha82(pTX*K(#ZnfS?EeH3lr(Imm~0l<v{vr1Ed=VjWm?)DCo6V2|BUc
z4!y>h7!{+#b&A)=K@Ui)_Bmjv|8D<s1*Rt^#_QK7gI4Iu`fXv0;X(V>je@J&L-r8<
zjbLx=&uq_1S(Tkhy;ptPt-LFDhqUspt-`5OcP|UH=GW8~9Mz<fwcuDOXq*MdHK}AR
zI8h23XTeELDp;B${qXCzskn?lP0N!r7*;sTmz3kA!mlcMK+y*|Ue@!X!abx_`>y4B
znu5LSHHtMT>v=(`H;@i!^=YcDJ|TV%zb~G>OrI)Tx$o$|<#EdT?_^LhxI~=z!UM;d
zpPRWiKjq9!I%=reV?8KMSbMYw;@N7CfFqMEaBf1?4itSUU5hif<y4Px(r2B$^x0yV
zI+$uV3Lr{6H`<x<N?dU}q1!^Owy1nuTY|X`gdZY+mngCWQDlL1kvTe-Xv?l>b;HOX
z41EweRJ>Ip3sy4_ogi|{Gt$FUN*D;Ar4*>pp<GBn_-^Jx9y1E%QX;)T=*JVS6s^4^
zjsuCY^WE_E985FUTjGrWic&vN*OoWA2-hqKTvL<@*NtU?OqIW{47e}Y-t-?w1>NDY
z0}9KB%E8Qw@4HgN6f%UFc2AUnIT_6Tn`lQEQGI<-2@NUm6jHL|PU3UjN33f9XUb2%
za|D_B(<QC)f2;iQN$6RozeFuz^t(!5TS_p`YswkgRrzzGJa;&DlNm+Vky1^}{hKDB
z?9KdNAWj(9S(yR*&oQ7V`!jumIP<#c`abt3U-Rxzoaf4)&wm;*`u%Et|MXr|ZS_SB
Zm2K4P%gmMDlPdoo>i)ggosl>F{{R}I@?8J`

literal 0
HcmV?d00001

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
literal 2944
zcmeHJOHUL*5UyoV@hwEfL}T_~q8_$^0gRAfCgBwl0`WjRPG)xo7@3{H-C2UsC`V&_
z-aL6muO9dTCZ4&Nc=zJX_ydeq^>i^!?_j{Ic6O$!zIt?3Pj~e`o}8WPD3yRm32s3y
zF$%D8B<CH;I&cO~LnrcQ@v-oko?C#g-ydBYdEGZZ^}hGXhid1~tCzlQ9Y&puiLco(
zZmpwC<6}m4-og56(ntf}UGo~DSB(PjgViARn`01r^<b<S#!FF<YuAEC-CGK4W5Z%d
z3=NbiPzOFm`IGJ-!<_3NzW;6ip%s`OA0I7Wn+U3*7netbEe0y~&FdLgw)^dV{0-vS
z*q_-S7tY#aXIpaDx4T;MR2JcMYTJhebW+=g1=``))E0DUQqEd%G#50^f@7MLvlblB
z1&y=dgeGMyo$XHe@yk^7B2d!u<P0hbXZf6RbQFGB$=!<HkvMgcY+O*(MOrlPJ*jVB
z&*zAjwDs&!ao!>A*4D>SQ*9yMqkS*#VGpEzm+Z3?f@k`qaKdOX4o2e=^~4u7aNUKu
zncEAK?#zU%nyNj#3#ATg5AA}uzuJS~#z`8uH`=08<dx?Adg@i(_V!J>w6T{iT@ITr
zrq{woA0;&}au-{1Ee(@ci96RoR-$~<a-G*?uAA^f8V(}M3aQKh=`wRvi&%<VqS^{0
zzY_W&B$VAvA`RA45RD-6c52hA#2|PLHGvj3j29CSzL$C+<3(Y-lEk$@=%tBj6Rm4W
zy&l9ESI&etWu=*VwG}<%zv3^V7oE<0$7W%ijKCE|neckCERZSk_mu(ff3`RMM^Qn0
z)$AM(l>_f%_BZ88<!|P{p&ZN(V9xKL9brWEv8fX3SKvvcWXBzg>zYT5ax&+Ch8PV#
zx0#gLGEdaQr^x@UGU`*5iCO<$<xl^g^s%i3&X;v&{i~>;n5Mr35qFHj9K`hT6a|{Y
z^mj}^IhpytM4T{QXJrQLKgWQg?9cQK;>_!&FZMY<`5Gn4Ft3z9*MAC8`k%_{$={#u
fg`%mpRWtc4qvbC%SGqTf{J*IEx0$<2&h-BcXZ_&m

literal 0
HcmV?d00001

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..cd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XAb<^!0=O<rdi89PX<<ILs
ph$#Jk<$Ch>r~9I4s`sj?e3sGjmzgWwCq@2W)c$*!yGqXV{{^x{?kE5N

literal 0
HcmV?d00001

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
literal 2336
zcmeHI&1w`u5U$C@-xzSggWzRB1wCxLnKg?ptPCV^S%~XT*rN=yJDp_6PEW|pY61a|
zzJeZo1D`+yPa^mX;z^G_fmZc&yPcj<Bp$WNOjUnXUv;Ops^;0+`rSFl0lgf!1GAk*
z0Y06W>AqBbScG#hkNO3CTzq<iAsl}E+&K&HdN*qCUvD&Depq<(_0dVR$(Z<BkHvH!
z_p~Cu%SDuRL4*nK@?<wZfG2z}3Af^LcbT=>QmZZ<kMSy^9fSCv@^59Jx3bcyUt8s)
zI285U%wtOp@7DD~t9wnaiGMAu?LTw-ZSLI4&Z6F#tK_+|tI8%<c3l;2G^t^BfjY3f
zTsTz*5pm)4FYq%ZocekmzJ0e1iwHQzJvH;P!u5VZ5!(u<SwgE;2)KvRG4gX!;X{;F
z=RQWfX8gatPOTgWEJ-6ah9DRY`VWU|L4P$+L&#e`g3?6tZXSX3Wb#@Nh&1Ox8;Y0|
zFW-){0E15_9Drp9Ngj?+=6i+Q)*2DnmYA~9G@e9_I07c2Vl1+p@8>|5jKyXOEDG}w
zr28ZmJE<6RW*)>wSq5yJCJ7fvlYwvsH?lk&@2EWet+<2%s7iDibv$1wS2Um`eGkmV
za8t#Pl#~8FHOJ<6&_Fe2SMZ@GSW<px49rKJF#G<Rf7S3M)#mpVM&CDcy)rk3Zu9S>
zjWC=4R&jpTr`{{6MT`n{qs=b^1;ajHAWT@ZFwfp9;9!PGP4l&Uim292*Fot*h1K?@
wy`6jVe4zL*6oKZzd3^Nb(RD#{qUxwGs!;4Yx6h|JQpMj;qw+c0&1Lg{06qDUC;$Ke

literal 0
HcmV?d00001

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
literal 4040
zcmeHJJ8TqZ5FWD*F(wb}M34tjj)Ve&yt2>ON>DC32^@lij1X}}vDv#@+l%jZt-C#A
zl$WI_5><qhB56{DNTG<3Qbj@(Dcnc2DUeG#BpO6VX8xVIo&9%DKx#&}H#6Tn_kZrU
z3uiywH8KK1Bk&1inxFum?ak!65$iAs6EKSM>-aeMoL*dloeS6R|NiUM9~SOk`s>a&
zH}8Hq^W%-(XfrwS?`#<LH&G|r-ri1yXZQ~`*W+#yw7lhh)J(!S0w_S<%6ePD8-6$R
z8||P3N<CY_dJwgGHHiF9P>Z9$i<iB?Z?3{d(CzpuVY4>p&bu?S6@XpXE4@qE80pv0
zSv3A!em(-Z5jcJF<cZ3WQ$Zv2qsm8a)t#BDet0yMD%I)gH2!9BZ#|t`F14*V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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
literal 3024
zcmeHJJ!lkB5Pp}9|G$ZfLO@Qih{ZjVjR_ivEF>`o;)zAjZrQurBy09|<LzFEplB`e
z2SKpXR<IKV`xG`7X)NqSEYgaFrOxcm+`fCakzhLUal13~&Ci>i_vXF3H#u{ut56U;
z3gV*3Bu0f;-<9!J!dl|6I3&7(KMIcl&s2F<R9=)euB?81-}mNo`R>=JKTkb->+b|z
z5))oCUeH_t8OPdMO8M=sEQO8Ot=V(Upc;E&AVkewa)VklCIYAKjzwND@4K0L*=^LF
zd9OM)EJx(vP!R%kaj<PteX4DS`|tj*R$yv;e6-j<;Z{5+C|;1J94wjV&!k+@954sq
zHw3-0HM2if$;j<Y?7jS5ZzNsW8PZ6)HV?;6?Hq<snqN^HVz(k?tRePfg2EYMuOelv
zA@*g0!Wm+}BBd;zBi-WrFI{mQfP#`IXHX)X<zwV%5q^^79-`M1Jgesk!fl{=^WIAI
zoppOicrW=gd7UtLYPOFLAoeJAvnYj6fcL^W@|n!^9pM~>@o!0-Y+YJ2X$P9Dhc#Ih
zwmn;(zBW5)Pfyr%)|$g@C?34#xi*N8U2{m-K^VLCh|r^B<i#j%#7@QTJl0#fAlgKG
zyS|xcyx>JPB;WL1;fGbn&#r@1Ty`3sQvq$;z;faq;lXu5TwNos9O6gV7^#esoPZ`@
z1$2Qqtbv>lnzGXL{94JY37J6YT_<CAB^I*b`VM|~8l}bA5Cm?uNZ^8a!CWY0&50e6
z#PhviF$}7%R6kl)BCxK8^|~8C++-%Wc}r33R2S8Z|BCMeFYI>Oeytc5ai?2I%5WVS
zmcZos*T{hTiS2d&QBdGs);sDBIp}%uzUO$8<geS^Cj<RN(dW0o4l$(a_(BO?Ch!1I
zwB!B4-*pu*%*ljD9jhd??J2-Gf2Iy$dj2oT|141^?8ov=U=YLqW9nEZLH}M|UIM#3
ze@>LoC5~+|L-YYqtcgCqr2}NI=l>XR#0E&ug#F755M_U+&jDv%HGQ<j`O#OeJ;r%L
s{x?W@5HP$;^!3MkCU2^Z9iV{mBPFf3o-5u%dH(%$1;1)}ri||Y8}a$_X8-^I

literal 0
HcmV?d00001

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
literal 3048
zcmeHJPixdr5T7;G*4BTm^&ehV@t~GI+SHa>s4ld%7D`d1Ab1GbB;AH)U&<z1S`hRs
zQUp(eH?MvH5l_XhAc9|@-t^|J&Sc+g-oA!XdK8CEX6E;1=FOYDd2e6LEj~C_Dgjdo
z?m@0G3b5Oq%au&5z&SVzT__LYW8pKuv<%;d`fitd<WS>L@2C4;UTqKVEnho<V_8gm
zErznWi8|5FPK)z9*j$erY2Z66P3fg!ES=hV1mFkjf%KDUkZwJgPC{9Wf=-i-piy^g
zp*KA)CdBAi83P{Uphx6I(;P9>f46_R0`oI7Q{|hpK{a$``L3|V=&(I`t0k4~5qkuG
zW7r#qGdr+SR$*sS?-lQME9=VrA+4-yi*V}H{bYgG{MxVuJ(`w_7M#o#O|qa@({j;*
zzFg5H3r=ZTOQdt83x4mJ16L6!X?b!6qY7vJigKJ)_;scCEB-9Q^Lk!ZxQD!G-mPqW
zf8E|G{G#$__Bj*i)a;}msP=1htEd!yB0hlMk<Vo2Ulq<#82^*S$-hf`rh)@a)MH<G
z;5f@m3y+uQoP}9OowfFO2TBL8eWwHBBi9}SN5*O3OhC~L6n!m88>w4$ijVj9xJ(YP
z*s32CAzcj<2N%<f0*GSIjoR0PQa9X2=vHyGO;p}XZH>NdiwGakaIPfb=QSKelI4Uv
zTOIOMmZ%=0CYz$#3?qLy^g(1$>+Tb2u$h8r1d&T?Z>@|jx?ICRc*`X~A1IV7F$mvH
zUC3fap<Iil7YKdPqMD$!7uV~7#Ms$vcpDEVsq3xjSsz)Z{-RSrZOe9?ijr=$k(R*q
zWLTh3<nJp3?lZPG{ikq%_PE(;&y|Cj7xx3ln^XR#-AiR)o;2qC6|^IaxK6)RLJt*q
z8adhVzTtH}L5y;;@zLqEQuMt@5a-XFwl2wL{vXH~39pzAVm}5Y3WU-BG@ZUH#ayqc
zr)XE?&x!JR#jz_aD87xHYGTe`F#%<7=KmIP!ba3MGxlF%KymhG{vL6bb<^!b&QHE(
w?J3S1<^NO-o<ZyaKIZqQ`=@BC-Qzfb)NLeZsCYLN`%kK?`C}F(f0_P&0ZSMC9{>OV

literal 0
HcmV?d00001

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
literal 3024
zcmeHJ&1=+95P#cLt>3mP3W6-?p&s_xrnYFI5^QU&l!}L<w~*bWZR~DRH`!7_(37b6
zb@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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
literal 3048
zcmeHJ&1=+95Pxf0Tfc4VCn7B3K@WXxQ(J1Kve4GGP!>cAf`^bz(rsuqDVuC*K~V2f
z1W$rD!IL+!7mwl};7#x!sNg{_;!S6gnccT<V_UrHu*uB)X6C(lllSKB!}-Nq2MPtj
zR1h~sTVqs+oxZkQO2v{mDNcwUkWay5z*DX)iMKy4zN(amw#y^EUq`k+%I(KD-W&v5
zIwrgp{jj+KI@0@$wcg&wTGU89*IKt5zFiGGtF{&h;d*Oc=*BZ5wCmnX?1we5bhxa0
zjk;a)otX(aDaXc(FyaAt^48IsY!4xCnmt1PoBzcMlxJtBi&y5ns&9wI>(Z2C!{*f0
zOe&hA<|zEe;cV>BZPyAKf7sDRy4$-$jr3IJ;dpAh$q;x_yU7sB;aALt=vTD1Xoy2?
zMUf0~Skc;|A&#^aMKZ)uMax7y(>>z*FWqnffP#`IXD~)M>*pzOj_^yQ4-mhf;@CYh
zI!D|Ao;UAiYVWSwbHdM1JhOMH&|Uw}fDb5jD^Us`QoKLyvlz;eUqBvIzAyK>pX86e
zNbE0i8k(#}u5^TDEmaooEX`XBa~AblbD{&q#%o^dfVkzF<H8D~#Iq)IXTZ@{<D`+;
zRV%-}x9nlOi^pbtw-J&RKek{o&A<~u<k*3=+zg$>k3v%Uw#aINZ!E9+ZMaT|526DR
z?{LJ27(_1PG$-Kc>VU7Xg!PcMuqmreKX8YASI88~?mn4#8;Ot&FR*d#*~;*uYilqN
z+;XwN59Ei-k&v#P*diS>@Wa(8bUdjpT2^E5cA|RS3t{YZHn@$4<HUAW)vW(o#`A?;
zfVO38oDxZwTSz8wJsFlD<i)$>z~_wp_4sKp;2zgc+5-yU{m=2bK2Py_{*Nd??=<@S
zCGbNGxk}$Cq1yx=1CD;YZ+KmI0mGb3cvN~q%2^czne%7v5vJ$=lH%Zs=^&0{Fa!ZH
z{GX=MCsH_Hw(09nz>pWuiE_W<_!0}mw}9gu`urswAb&moXMiI%N_J)(Utxea$1{Hc
zILoT*);{OQSiSZ*&QprNN5<oTorZ_&$=@IEpS-DddcgqHrzNMUa5v<~Ptn!<Ivu6`
H(&K*vG{gO5

literal 0
HcmV?d00001

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"));
+	}
+      }
+    }
+}