3 echo "The variable CROSS must be set to point to the cross-compiler prefix"
10 echo "Usage: $0 <module>"
15 if [ -n "$KEEP_SYMBOLS" ]; then
16 ARGS="-X --strip-debug"
18 ARGS="-x -G __this_module --strip-unneeded"
21 if [ -z "$KEEP_BUILD_ID" ]; then
22 ARGS="$ARGS -R .note.gnu.build-id"
34 "$MODULE" "$MODULE.tmp"
36 [ -n "$NO_RENAME" ] && {
37 mv "${MODULE}.tmp" "$MODULE"
41 ${CROSS}nm "$MODULE.tmp" | awk '
46 $3 && $2 ~ /[brtd]/ && $3 !~ /\$LC/ && !def[$3] {
47 print "--redefine-sym "$3"=_"n;
53 ${CROSS}objcopy $(cat ${MODULE}.tmp1) ${MODULE}.tmp ${MODULE}.out
54 mv "${MODULE}.out" "${MODULE}"