ld_cache_rs
A simple parser for ld.so.cache in rust without any c bindings
Library to parse ld.so.cache according to the numerous format define in glibc
This library doesn't use any c bindings or doesn't try to create a structure to match
it over the data, it uses plain parsing and thus allow the definition of endianness.
As parsing ld.so.cache is useful to get access to the symbol, the parsing is done
stringently as well as fastly.
If you want to make a dirt cheap parser for ld.so.cache a simple call to
strings /etc/ld.so.cache
will do.
Usage
You usually want to load the default cache (/etc/ld.so.cache) with Cache::new()
, however if you need to load a file
and not the default one, we do support that with Cache::parse(buf: &[u8], endianness: TargetEndian)
where the
endianness is one of the 3 values, Big, Little and Native.
use ;
use Iter;