On 05/11/2011 10:52 AM, Mark Wielaard wrote:
> It seems safe to just remove it.

All right, in this case we also need to remove the redundant
parameters of `show_symbols_sysv'.  Tested on x86_64-redhat-linux,
ok to master?

        Marek

2011-05-11  Marek Polacek  <[email protected]>

        * nm.c (show_symbols_sysv): Remove unused if/else, remove
        unused `prefix' and `fname' parameters.

--- elfutils/nm.c.mp    2011-05-07 18:19:10.355146087 +0200
+++ elfutils/nm.c       2011-05-11 14:11:48.351433632 +0200
@@ -718,8 +718,7 @@ sym_name (Elf *elf, GElf_Word strndx, GE
 
 /* Show symbols in SysV format.  */
 static void
-show_symbols_sysv (Ebl *ebl, GElf_Word strndx,
-                  const char *prefix, const char *fname, const char *fullname,
+show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
                   GElf_SymX *syms, size_t nsyms, int longest_name,
                   int longest_where)
 {
@@ -762,10 +761,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word s
   int digits = length_map[gelf_getclass (ebl->elf) - 1][radix];
 
   /* We always print this prolog.  */
-  if (prefix == NULL || 1)
-    printf (gettext ("\n\nSymbols from %s:\n\n"), fullname);
-  else
-    printf (gettext ("\n\nSymbols from %s[%s]:\n\n"), prefix, fname);
+  printf (gettext ("\n\nSymbols from %s:\n\n"), fullname);
 
   /* The header line.  */
   printf (gettext ("%*s%-*s %-*s Class  Type     %-*s %*s Section\n\n"),
@@ -1185,9 +1181,8 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr,
   switch (format)
     {
     case format_sysv:
-      show_symbols_sysv (ebl, shdr->sh_link, prefix, fname,
-                        fullname, sym_mem, nentries, longest_name,
-                        longest_where);
+      show_symbols_sysv (ebl, shdr->sh_link, fullname, sym_mem, nentries,
+                        longest_name, longest_where);
       break;
 
     case format_bsd:
_______________________________________________
elfutils-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/elfutils-devel

Reply via email to