diff --git a/.gitignore b/.gitignore index 39b78a63..8cc2980e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ toolchain/ .vscode/ **/*.o initrd/boot/moon.elf -kernel/bin/moon.elf \ No newline at end of file +kernel/bin/moon.elf +initrd/sys/moon.sym \ No newline at end of file diff --git a/kernel/Makefile b/kernel/Makefile index 561776c1..340ea91d 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -74,4 +74,5 @@ moon-clean: $(LUNA_ROOT)/initrd/boot/moon.elf: $(MOON_BIN)/moon.elf @mkdir -p $(@D) - cp $^ $@ \ No newline at end of file + cp $^ $@ + tools/generate-symbols.sh \ No newline at end of file diff --git a/tools/generate-symbols.sh b/tools/generate-symbols.sh new file mode 100755 index 00000000..9572466d --- /dev/null +++ b/tools/generate-symbols.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +source $(dirname $0)/env.sh + +cd $LUNA_ROOT + +nm -C -n initrd/boot/moon.elf | grep -vE \\.Lubsan_data | awk '{ if ($2 != "a") print; }' | uniq > initrd/sys/moon.sym \ No newline at end of file