From 637304bdb3dbcd42fa976657b3b235184ffbaf01 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Tue, 8 Feb 2022 22:12:45 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Add=20better=20nm=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Demangle and sort by symbol address. --- nucleus/Makefile.toml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nucleus/Makefile.toml b/nucleus/Makefile.toml index 3beaf26..0b1e5db 100644 --- a/nucleus/Makefile.toml +++ b/nucleus/Makefile.toml @@ -49,13 +49,18 @@ script = [ [tasks.gdb-cb] disabled = true -[tasks.nm] -dependencies = ["build", "kernel-binary"] -script = [ - "${NM} -- ${KERNEL_ELF} | sort" -] +[tasks.install-nm] install_crate = { crate_name = "cargo-binutils", binary = "rust-nm", test_arg = ["--help"] } +[tasks.install-rustfilt] +install_crate = { crate_name = "rustfilt", binary = "rustfilt", test_arg = ["--help"] } + +[tasks.nm] +dependencies = ["build", "kernel-binary", "install-nm", "install-rustfilt"] +script = [ + "${NM} -- ${KERNEL_ELF} | sort -k 1 | rustfilt" +] + [tasks.sdcard] dependencies = ["build", "kernel-binary"] script_runner = "@duckscript"