shithub: scc

Download patch

ref: 6a972ee63bdb46b8fdc57af1740154c7ba576604
parent: 3e50e418c633600bac4a41e899147d9e8de78f29
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Jan 7 13:16:05 EST 2019

[nm] Restore filter

Last commit remove the filter expressions and this commit
restore them.

--- a/src/nm/nm.c
+++ b/src/nm/nm.c
@@ -119,6 +119,16 @@
 	struct symtbl *tbl = data;
 	Symbol **p;
 	size_t n, size;
+	int type = sym->type;
+
+	if (type == '?' || type == 'N')
+		return 1;
+
+	if (uflag && type != 'U')
+		return 1;
+
+	if (gflag && !isupper(type))
+		return 1;
 
 	n = tbl->nsyms+1;
 	if (n == 0 || n > SIZE_MAX / sizeof(*p))