27 lines
954 B
Bash
Executable File
27 lines
954 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
nm=$(printenv RISCV_NM || true)
|
|
readelf=$(printenv RISCV_READELF || true)
|
|
test -n "$nm" || nm=riscv64-unknown-elf-nm
|
|
test -n "$readelf" || readelf=riscv64-unknown-elf-readelf
|
|
elf=build/task01_notifications/prog.elf
|
|
|
|
if "$nm" --defined-only "$elf" | awk '{print $3}' | grep -Eq '^_Z|^__cxa_|^_Unwind_'; then
|
|
echo "unexpected C++ or unwind symbol in FC10" >&2
|
|
exit 1
|
|
fi
|
|
if "$readelf" -S "$elf" | grep -Eq '\.init_array|\.eh_frame|\.gcc_except_table'; then
|
|
echo "unexpected C++ initialization or unwind section in FC10" >&2
|
|
exit 1
|
|
fi
|
|
for symbol in fc10_sender_entry fc10_receiver_entry fc10_verifier_entry \
|
|
fc10_checkpoint_committed xTaskGenericNotify xTaskGenericNotifyWait \
|
|
ulTaskGenericNotifyTake; do
|
|
"$nm" --defined-only "$elf" | grep -Eq "[[:space:]]$symbol$" || {
|
|
echo "required symbol is missing: $symbol" >&2
|
|
exit 1
|
|
}
|
|
done
|
|
echo "PASS ABI: FC10 is freestanding C11 with direct task notifications"
|