[PATCH] nm output fix for sysv format.
Elias Athanasopoulos
eathan@otenet.gr
Sat May 11 01:43:00 GMT 2002
Hi all,
This (not so perfect) patch fixes the output of nm, when it used with the
sysv format. It eliminates output such as:
% nm -fsysv /usr/lib/libc.a
[snipped]
__pthread_initialize| | w | | | |
__pthread_initialize_minimal| | w | | | |
[snipped]
I would appreciate any feedback on that (even if the patch is not ok).
Elias
--
http://gnewtellium.sourceforge.net MP3 is not a crime.
-------------- next part --------------
--- nm.c.orig Sat May 11 11:48:13 2002
+++ nm.c Sat May 11 11:41:06 2002
@@ -1515,7 +1515,8 @@
symbol_info *info;
bfd *abfd;
{
- print_symname ("%-20s|", info->name, abfd); /* Name */
+ const char *p;
+ print_symname ("%-20.20s|", info->name, abfd); /* Name */
if (bfd_is_undefined_symclass (info->type))
printf (" "); /* Value */
else
@@ -1530,6 +1531,12 @@
}
else
printf (" | | |"); /* Type, Size, Line, Section */
+ for (p = info->name + 20; p - info->name < (int) strlen (info->name); p += 20) {
+ print_symname ("\n%-20.20s|", p, abfd);
+ printf (" | | | | |");
+ }
+ printf ("\n---------------------");
+ printf (" | | | | |");
}
static void
More information about the Binutils
mailing list