The libmeminfo extracts the memory configuration from ELF files. This memory configuration must be saved first inside the binary at link-time with the linker-script command CREATE_MEMINFO_TABLE. This new command and its documentation are available once the patch is applied against the GNU Binutils.
The file meminfo.h comments the API, and the file mind.c is a very good example on how to use this library. You can test the program mind against the file test.elf.
If you don't want to use the local libELF to build the libmeminfo, set the parameter --disable-local-libelf during the configuration