aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-semihosting/check-blobs.sh
blob: 94fde420b34e145b508449c27aa1d8776ffb2b67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

# Checks that the blobs are up to date with the committed assembly files

set -euxo pipefail

for lib in $(ls bin/*.a); do
    filename=$(basename $lib)
    arm-none-eabi-objdump -Cd $lib > bin/${filename%.a}.before
done

./assemble.sh

for lib in $(ls bin/*.a); do
    filename=$(basename $lib)
    arm-none-eabi-objdump -Cd $lib > bin/${filename%.a}.after
done

for cksum in $(ls bin/*.after); do
    diff -u $cksum ${cksum%.after}.before
done