From ab4ed68aa978211861f05b344ef1b9b4becc96dc Mon Sep 17 00:00:00 2001 From: Dmytro Voroshylov Date: Tue, 9 Jul 2019 20:08:21 +0300 Subject: [PATCH] REMOVE FUCKING DEBUG SYMBOLS\! YEAH\! --- src/main.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main.c b/src/main.c index fd0c8a1..16f1e62 100644 --- a/src/main.c +++ b/src/main.c @@ -97,13 +97,9 @@ int main(int argc, char **argv) int type = symbol.n_type & N_TYPE; int external = symbol.n_type & N_EXT; int offset = external ? 0 : 32; + char *name = str_table + symbol.n_un.n_strx; - if ( - type != N_UNDF && - type != N_ABS && - type != N_SECT && - type != N_PBUD && - type != N_INDR) + if ((symbol.n_type & N_STAB) != 0) { j++; continue; @@ -121,7 +117,7 @@ int main(int argc, char **argv) if (type == N_SECT) ft_putchar('T' + offset); ft_putchar(' '); - ft_putstr(str_table + symbol.n_un.n_strx); + ft_putstr(name); ft_putstr("\n"); j++; }