#!/usr/bin/env sh

if have readelf; then
    echo "=== ELF Header ==="
    readelf -h "$target"

    echo
    echo "=== Sections ==="
    readelf -S "$target"

    echo
    echo "=== Symbols ==="
    readelf -s "$target"

    echo
elif have exiftool; then
    exiftool -exclude Content "$target" | tail -n +4
elif have file; then
    file -bL "$target"
else
    echo "No viewer for $target"
fi