commit 33e9e2f47ca3ed15da08672d7e956420f1773988
parent 46c6717eafbbe24d484fababc77113eb7463a185
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 20 Jan 2025 16:03:55 +0100
nm: Filter based in know types
Nm by default hides some symbols. We were filtering everything
that is not a function or an object, but we can have symbols
with no type due to a lack of symbolic debug information, and
for that reason is better to filter based in the type of symbols
that we do know that we have to filter.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cmd/scc-nm.c b/src/cmd/scc-nm.c
@@ -128,7 +128,7 @@ newsym(Symbol *sym, struct symtbl *tbl)
if (type == '?' && !fflag
|| type == 'N' && !fflag
- || stype != SYMFUNC && stype != SYMOBJECT && !fflag
+ || (stype == SYMSECTION || stype == SYMFILE) && !fflag
|| uflag && type != 'U'
|| gflag && !isupper(type)) {
return 0;