#!/bin/sh

echo "/* Autogenerated file, don't edit */"
echo "#ifndef BIOS_OFFSETS_H"
echo "#define BIOS_OFFSETS_H"

echo ""
echo "#define BIOS_ENTRY_SIZE(name) (name##_end - name)"
echo ""

nm bios.bin.elf | grep ' [Tt] ' | awk '{ print "#define BIOS_OFFSET__" $3 " 0x" $1; }'

echo ""
echo "#endif"
