From 08c8074769975d22d98986769b96e3f678732199 Mon Sep 17 00:00:00 2001 From: djmil Date: Sun, 23 Jun 2024 23:01:13 +0200 Subject: [PATCH] Update README.md --- README.md | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 8646cc3..06ec6df 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - Kernel module [compilation](https://www.kernel.org/doc/html/v5.6/kbuild/modules.html) *depends* on kernel headers. This is a [deliberate design choice](https://github.com/torvalds/linux/blob/v4.9/Documentation/stable_api_nonsense.txt) made by kernel developers. As result, there is no even a slight guarantee of an ABI compatibility even between minor kernel versions. > But what to do if, for the variety of reasons, for the kernel you are interest in, headers are unavailable? @@ -149,23 +148,13 @@ In order for module to use any externally declared symbol module must: # Misc commands -* Module loading -```bash -insmod module_name.ko -``` +```shell +insmod module_name.ko # Module loading -* List loaded modules -```bash -lsmod -``` +rmmod MODULE_NAME # Module unload + # MODULE_NAME can be found in `.gnu.linkonce.this_module` section -* Logs -```bash -dmesg | grep insmod -``` +lsmod # List loaded modules -* Module unloading -```bash -rmmod MODULE_NAME # from .gnu.linkonce.this_module section +dmesg | grep insmod # See logs ``` -