Skip to content

Instantly share code, notes, and snippets.

@Inndy
Created April 16, 2024 08:10
Show Gist options
  • Save Inndy/d68d648262b7f2d2d07f7b657090b9a9 to your computer and use it in GitHub Desktop.
Save Inndy/d68d648262b7f2d2d07f7b657090b9a9 to your computer and use it in GitHub Desktop.
#!/bin/bash
f="$1"
if [ -z "$f" ]
then
echo "Usage: $0 elf-to-fix"
exit 1
fi
if [ -n "$f" -a ! -f "$f" ]
then
f=$(which "$f")
fi
f=$(realpath "$f")
perm=$(stat -c %a "$f")
chmod +w "$f"
strip --remove-section=.note.ABI-tag "$f"
chmod $perm "$f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment