gensyms: Filter out non-function symbols

This commit is contained in:
mintsuki 2023-06-20 08:54:53 +02:00
parent 67fd1a8d9f
commit 6e41938206

View File

@ -29,8 +29,8 @@ TMP4="$(mktemp)"
trap "rm -f '$TMP1' '$TMP2' '$TMP3' '$TMP4'; trap - EXIT; exit" EXIT INT TERM QUIT HUP
"$OBJDUMP_FOR_TARGET" -t "$1" | ( "$SED" '/[[:<:]]d[[:>:]]/d' 2>/dev/null || "$SED" '/\bd\b/d' ) | sort > "$TMP1"
"$GREP" "$4" < "$TMP1" | cut -d' ' -f1 > "$TMP2"
"$GREP" "$4" < "$TMP1" | "$AWK" 'NF{ print $NF }' > "$TMP3"
"$GREP" "F $4" < "$TMP1" | cut -d' ' -f1 > "$TMP2"
"$GREP" "F $4" < "$TMP1" | "$AWK" 'NF{ print $NF }' > "$TMP3"
echo ".section .$2_map" > "$TMP4"
echo ".globl $2_map" >> "$TMP4"