mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
![Daniel Bertalan](/assets/img/avatar_default.png)
By using the binary from our build of binutils, we can be sure that `nm` supports demangling symbols, so we can avoid spawning a separate `c++filt` process.
8 lines
238 B
Bash
8 lines
238 B
Bash
#!/bin/sh
|
|
tmp=$(mktemp)
|
|
NM="${NM:-nm}"
|
|
"$NM" -C -n Kernel | grep -vE \\.Lubsan_data | awk '{ if ($2 != "a") print; }' | uniq > "$tmp"
|
|
printf "%08x\n" "$(wc -l "$tmp" | awk '{print $1}')" > kernel.map
|
|
cat "$tmp" >> kernel.map
|
|
rm -f "$tmp"
|