at master 484 B view raw
1#!/usr/bin/env bash 2 3# This script exists as a workaround for https://github.com/rust-lang/rust/issues/142119 4 5set -e 6 7target=$1 8 9if [ -z "$target" ]; then 10 echo "Usage:\n\t./stripcore.sh TARGET" 11 exit 1 12fi 13 14for sym in cbrtf ceilf copysignf fabsf fdimf floorf fmaf fmaxf fminf fmodf rintf roundf sqrtf truncf \ 15 cbrt ceil copysign fabs fdim floor fmax fmin fmod rint round sqrt trunc; do \ 16 "$OBJCOPY" --globalize-symbol=$sym --strip-symbol=$sym "$target"; \ 17done