Skip to content

Instantly share code, notes, and snippets.

@EllipticEllipsis
Created August 8, 2021 21:20
Show Gist options
  • Select an option

  • Save EllipticEllipsis/be60f68aa90cd8c2c45951bed33ad0dc to your computer and use it in GitHub Desktop.

Select an option

Save EllipticEllipsis/be60f68aa90cd8c2c45951bed33ad0dc to your computer and use it in GitHub Desktop.
Check for reorderings in MM boot bss
echo "Symbol Name,Build,Expected,Status,Difference" ; awk 'NF==2 && 0x80099500 <= strtonum($1) && strtonum($1) < 0x8009f8b0 { arr[$2]=arr[$2]","strtonum($1) } END { for ( i in arr ) { printf "%s%s\n", i,arr[i] } }' build/mm.map expected/build/mm.map | sort -t , -k 3,3 | awk -F',' 'NF!=3 {print $0,"Symbol missing: renamed?"} NF==3 { printf "%s,%X,%X,%s,%s0x%X\n", $1,$2,$3,( $2==$3 ? "GOOD" : "BAD" ),( $2<$3 ? "-" : "" ), ( $2 < $3 ? $3-$2 : $2-$3 ) }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment