Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ld wrapper
#!/bin/bash
# Simple ld wrapper that ignores --build-id parameters
LD=/usr/bin/ld
options=() # the buffer array for the parameters
eoo=0 # end of options reached
while [[ $1 ]]
do
if ! ((eoo)); then
case "$1" in
--build-id*)
shift
;;
*)
options+=("$1")
shift
;;
esac
else
options+=("$1")
shift
fi
done
$LD "${options[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment