Files
asminject/get_relative_offsets.sh
2022-08-03 19:50:44 -07:00

5 lines
359 B
Bash

#!/bin/bash
# Shortcut for creating relative offset lists for use with asminject.py
# You may need to install binutils (e.g. apt install binutils) if the readelf binary is not already present
readelf -a --wide "$1" | grep DEFAULT | grep -P '(FUNC|OBJECT)' | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | sed 's/ / /g' | cut -d" " -f3,9