Files
RedBear-OS/stripcore.sh
T
Wildan Mubarok 9c43abbcf9 Add f functions
2025-10-05 17:05:25 +00:00

18 lines
476 B
Bash
Executable File

#!/usr/bin/env bash
# This script exists as a workaround for https://github.com/rust-lang/rust/issues/142119
set -e
target=$1
if [ -z "$target" ]; then
echo "Usage:\n\t./stripcore.sh TARGET"
exit 1
fi
for sym in cbrtf ceilf copysignf fabsf fdimf floorf fmaxf fminf fmofd rintf roundf sqrtf truncf \
cbrt ceil copysign fabs fdim floor fmax fmin fmod rint round sqrt trunc; do \
objcopy --globalize-symbol=$sym --strip-symbol=$sym "$target"; \
done