The annocheck program is mostly seen as a security checking
tool and in order to allow third party programs such as
rpminspect the ability to access these checks a library
interface is provided.
An example of how to use the libannocheck library can be found in the
annobin testsuite. In particular the tests/use-libannocheck.c
file contains code to initialise, run and then close the library. In
theory however the code flow looks like this:
#include <libannocheck.h> struct libannocheck_internals * handle; unsigned int num_fails, num_maybs; handle = libannocheck_init (libannocheck_version, "a.out", NULL); libannocheck_disable_all_tests (handle); libannocheck_enable_test (handle, "bind-now"); libannocheck_run_tests (handle, & num_fails, & num_maybs); libannocheck_finish (handle);
The library consists of a header file (libannocheck.h) and a
shared object file (libannocheck.so). It provides the following
functions: