findshlibs 0.1.0

Find the set of shared libraries loaded in the current process with a cross platform API
Documentation
#!/usr/bin/env bash

# Usage:
#
#     ./regen_linux_bindings path/to/bindgen/executable
#
# Regenerate the linux bindings for dl_iterate_phdr and friends.

set -xe

cd $(dirname $0)

BINDGEN=$1

$BINDGEN \
    --raw-line '#![allow(non_snake_case)]' \
    --raw-line '#![allow(non_camel_case_types)]' \
    --whitelist-function dl_iterate_phdr \
    ./src/linux/bindings.h \
    > ./src/linux/bindings.rs