Introduce the --kmi-whitelist option to abidiff
authorDodji Seketeli <dodji@redhat.com>
Mon, 12 Jun 2017 13:19:01 +0000 (15:19 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 3 Jul 2017 15:45:37 +0000 (17:45 +0200)
abidiff had an --linux-kernel-abi-whitelist option.  Rename it
--kmi-whitelist.

* doc/manuals/abidiff.rst: Add documentation for the
--kmi-whitelist option.
* tools/abidiff.cc (display_usage): Emit help string for the
--kmi-whitelist option
(parse_command_line): Parse the new --kmi-whitelist option, of the
-w shortcut.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
doc/manuals/abidiff.rst
tools/abidiff.cc

index fd3710acd86cbe23a77f06f7d38bf5f696c8bf8e..41bfd2075781a59d8f38f1bdbfa65503bba60f5b 100644 (file)
@@ -107,6 +107,24 @@ Options
     ELF binary.  It thus considers functions and variables which are
     defined and exported in the ELF sense.
 
+  * ``--kmi-whitelist | -kaw`` <*path-to-whitelist*>
+
+    When analyzing a Linux kernel binary, this option points to the
+    white list of names of ELF symbols of functions and variables
+    which ABI must be considered.  That white list is called a "Kernel
+    Module Interface white list".  This is because for the Kernel, we
+    don't talk about ``ABI``; we rather talk about the interface
+    between the Kernel and its module. Hence the term ``KMI`` rather
+    than ``ABI``.
+
+    Any other function or variable which ELF symbol are not present in
+    that white list will not be considered by this tool.
+
+    If this option is not provided -- thus if no white list is
+    provided -- then the entire KMI, that is, the set of all publicly
+    defined and exported functions and global variables by the Linux
+    Kernel binaries, is considered.
+
   * ``--drop-private-types``
 
     This option is to be used with the ``--headers-dir1`` and
index 84b294e567cccc3d4dc616fd555307fc191ef856..5c0204db4338627a7cb2cc824a65f5c662703bce 100644 (file)
@@ -155,7 +155,7 @@ display_usage(const string& prog_name, ostream& out)
     "internal representation\n"
     << " --no-linux-kernel-mode  don't consider the input binaries as "
        "linux kernel binaries\n"
-    << " --linux-kernel-abi-whitelist|--lkaw  path to a "
+    << " --kmi-whitelist|-w  path to a "
        "linux kernel abi whitelist\n"
     << " --stat  only display the diff stats\n"
     << " --symtabs  only display the symbol tables of the corpora\n"
@@ -287,8 +287,8 @@ parse_command_line(int argc, char* argv[], options& opts)
          opts.headers_dir2 = argv[j];
          ++i;
        }
-      else if (!strcmp(argv[i], "--linux-kernel-abi-whitelist")
-              || !strcmp(argv[i], "--lkaw"))
+      else if (!strcmp(argv[i], "--kmi-whitelist")
+              || !strcmp(argv[i], "-w"))
        {
          int j = i + 1;
          if (j >= argc)