Skip to content

Instantly share code, notes, and snippets.

@Sherlock-Holo
Created October 23, 2021 09:46
Show Gist options
  • Save Sherlock-Holo/e5aa640d89fdf989152ee7a488f09777 to your computer and use it in GitHub Desktop.
Save Sherlock-Holo/e5aa640d89fdf989152ee7a488f09777 to your computer and use it in GitHub Desktop.
strip-bpf-tc.sh
#!/bin/bash
for sec in '.BTF.ext' '.eh_frame' '.debug_loc' '.debug_info' '.debug_ranges' '.debug_frame' '.debug_line'
do
llvm-strip --remove-section $sec $1
done
llvm-strip --remove-section .text $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment