summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2018-01-01 22:40:35 -0500
committeryenatch <yenatch@gmail.com>2018-01-01 22:40:35 -0500
commitf185cc9b77caf956f772fc8775be0386b60318e2 (patch)
tree4a860c2528a2d80e37a87daf814d5c5a8d3e124c /tools
parentf27f79488a460f0a89670f3611e1e9e175baf5d6 (diff)
sort the symfile by symbol type
Diffstat (limited to 'tools')
-rwxr-xr-xtools/sort_symfile.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/sort_symfile.sh b/tools/sort_symfile.sh
new file mode 100755
index 000000000..1b39fbc6f
--- /dev/null
+++ b/tools/sort_symfile.sh
@@ -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"