#!/usr/bin/env bash

set -e

source $(dirname $0)/env.sh

cd $LUNA_ROOT

rm -f initrd/sys/moon.sym

nm -C -n initrd/boot/moon | grep -vE \\.Lubsan_data | awk '{ if ($2 != "a") print; }' | uniq > initrd/sys/moon.sym

chmod 400 initrd/sys/moon.sym