sort the symfile by symbol type

This commit is contained in:
yenatch
2018-01-01 22:40:35 -05:00
parent f27f79488a
commit f185cc9b77
2 changed files with 11 additions and 2 deletions

9
tools/sort_symfile.sh Executable file
View File

@@ -0,0 +1,9 @@
sed $1 \
-e "s/^..:[0-3]/0_ROM0@&/g" \
-e "s/^..:[4-7]/1_ROMX@&/g" \
-e "s/^..:[8-9]/2_VRAM@&/g" \
-e "s/^..:[A-B]/3_SRAM@&/g" \
-e "s/^00:[C-D]/4_WRAM0@&/g" \
-e "s/^..:[D-D]/5_WRAMX@&/g" \
| sort -o $1
sed -i $1 -e "s/^\w*@//g"