Skip to content

Instantly share code, notes, and snippets.

@ehershey
Created May 1, 2015 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehershey/db429426fdbf85252761 to your computer and use it in GitHub Desktop.
Save ehershey/db429426fdbf85252761 to your computer and use it in GitHub Desktop.
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