ABIDW(1)                         Libabigail                         ABIDW(1)

NAME         top

       abidw - serialize the ABI of an ELF file ====== abidw ======

       abidw reads a shared library in ELF format and emits an XML represen‐
       tation of its ABI to standard  output.   The  emitted  representation
       includes all the globally defined functions and variables, along with
       a complete representation of their types.  It also includes a  repre‐
       sentation of the globally defined ELF symbols of the file.  The input
       shared library must contain associated  debug  information  in  DWARF

       When  given  the  --linux-tree option, this program can also handle a
       Linux kernel tree.  That is, a directory tree that contains both  the
       vmlinux  binary  and  Linux  kernel modules.  It analyses those Linux
       kernel binaries and emits an  XML  representation  of  the  interface
       between the kernel and its module, to standard output.  In this case,
       we don't call it an ABI, but a KMI (Kernel  Module  Interface).   The
       emitted  KMI  includes  all  the globally defined functions and vari‐
       ables, along with a complete  representation  of  their  types.   The
       input  binaries  must  contain  associated debug information in DWARF

          abidw [options] [<path-to-elf-file>]

          · --help | -h

            Display a short help about the command and exit.

          · --version | -v

            Display the version of the program and exit.

          · --debug-info-dir | -d <dir-path>

            In cases where the debug info for path-to-elf-file is in a sepa‐
            rate  file  that  is located in a non-standard place, this tells
            abidw where to look for that debug info file.

            Note that dir-path must point to the root directory under  which
            the  debug information is arranged in a tree-like manner.  Under
            Red   Hat   based   systems,   that   directory    is    usually

            Note  that this option is not mandatory for split debug informa‐
            tion installed by your system's  package  manager  because  then
            abidw knows where to find it.

          · --out-file <file-path>

            This  option  instructs  abidw to emit the XML representation of
            path-to-elf-file into the file file-path, rather  than  emitting
            it to its standard output.

          · --noout

            This  option  instructs abidw to not emit the XML representation
            of the ABI.  So it only reads the  ELF  and  debug  information,
            builds  the  internal representation of the ABI and exits.  This
            option is usually useful for debugging purposes.

          · --no-corpus-path

            Do not emit the path attribute for the ABI corpus.

          · --suppressions | suppr <path-to-suppression-specifications-file>

            Use a suppression specification file located at path-to-suppres‐
            sion-specifications-file.  Note that this option can appear mul‐
            tiple times on the command line.  In that case, all of the  pro‐
            vided  suppression  specification  files are taken into account.
            ABI artifacts matched by the suppression specifications are sup‐
            pressed from the output of this tool.

          · --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 written out.  That white list is called a "
            Kernel Module Interface white list".  This is  because  for  the
            Kernel,  we  don't  talk about the 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  the  KMI  writing

            If  this option is not provided -- thus if no white list is pro‐
            vided -- then the entire KMI, that is, all publicly defined  and
            exported  functions  and  global  variables  by the Linux Kernel
            binaries is emitted.

          · --linux-tree | --lt

            Make abidw to consider the input path as a path to  a  directory
            containing  the  vmlinux  binary as several kernel modules bina‐
            ries.  In that case, this program emits  the  representation  of
            the Kernel Module Interface (KMI) on the standard output.

            Below is an example of usage of abidw on a Linux Kernel tree.

            First,  checkout  a Linux kernel source tree and build it.  Then
            install the kernel modules in a directory somewhere.   Copy  the
            vmlinux  binary into that directory too.  And then serialize the
            KMI of that kernel to disk, using abidw:

                $ git clone git://
                $ cd linux && git checkout v4.5
                $ make allyesconfig all
                $ mkdir build-output
                $ make INSTALL_MOD_PATH=./build-output modules_install
                $ cp vmlinux build-output/modules/4.5.0
                $ abidw --linux-tree build-output/modules/4.5.0 > build-output/linux-4.5.0.kmi

          · --headers-dir | --hd <headers-directory-path-1>

            Specifies where to find the public headers of the  first  shared
            library  that the tool has to consider.  The tool will thus fil‐
            ter out types that are not defined in public headers.

          · --no-linux-kernel-mode

            Without this option, if abipkgiff detects that the  binaries  it
            is  looking at are Linux Kernel binaries (either vmlinux or mod‐
            ules) then it only considers functions and variables  which  ELF
            symbols are listed in the __ksymtab and __ksymtab_gpl sections.

            With  this option, abipkgdiff considers the binary as a non-spe‐
            cial ELF binary.  It  thus  considers  functions  and  variables
            which are defined and exported in the ELF sense.

          · --check-alternate-debug-info <elf-path>

            If  the debug info for the file elf-path contains a reference to
            an alternate debug info file, abidw checks that it can find that
            alternate  debug info file.  In that case, it emits a meaningful
            success message mentioning the full path to the alternate  debug
            info file found.  Otherwise, it emits an error code.

          · --no-show-locs
              Do  not  show  information  about  where  in the second shared
              library the respective type was changed.

          · --check-alternate-debug-info-base-name <elf-path>

            Like --check-alternate-debug-info, but in the  success  message,
            only  mention the base name of the debug info file; not its full

          · --load-all-types

            By default, libabigail (and thus abidw) only  loads  types  that
            are reachable from functions and variables declarations that are
            publicly defined and exported by  the  binary.   So  only  those
            types  are  present in the output of abidw.  This option however
            makes abidw load all the types defined  in  the  binaries,  even
            those that are not reachable from public declarations.

          · --abidiff
              Load  the  ABI of the ELF binary given in argument, save it in
              libabigail's XML format in a temporary file; read the ABI from
              the  temporary XML file and compare the ABI that has been read
              back against the ABI of the ELF binary given in argument.  The
              ABIs should compare equal.  If they don't, the program emits a
              diagnostic and exits with a non-zero code.

              This is a debugging and sanity check option.

          · --annotate
              Annotate the ABIXML output with comments above most  elements.
              The comments are made of the pretty-printed form types, decla‐
              ration or even ELF symbols.  The purpose is to make the ABIXML
              output  more  human-readable for debugging or documenting pur‐

          · --stats

            Emit statistics about various internal things.

          · --verbose

            Emit verbose logs about the progress of  miscellaneous  internal


       As of the version 4 of the DWARF specification, Alternate debug
       information is a GNU extension to the DWARF specification.  It has
       however been proposed for inclusion into the upcoming version 5 of
       the DWARF standard.  You can read more about the GNU extensions to
       the DWARF standard here.

AUTHOR         top

       Dodji Seketeli

COPYRIGHT         top

       2014-2016, Red Hat, Inc.

COLOPHON         top

       This page is part of the libabigail (ABI Generic Analysis and
       Instrumentation Library) project.  Information about the project can
       be found at ⟨⟩.  If you have a bug
       report for this manual page, see 
       This page was obtained from the project's upstream Git repository 
       ⟨git://⟩ on 2017-09-15.  If you dis‐
       cover any rendering problems in this HTML version of the page, or you
       believe there is a better or more up-to-date source for the page, or
       you have corrections or improvements to the information in this
       COLOPHON (which is not part of the original manual page), send a mail

                                Sep 15, 2017                        ABIDW(1)