usr/src/cmd/sgs/nm/common/nm.c
changeset 9521 b061a79d3d1a
parent 9519 fc2830e2f3c4
child 9694 78fafb281255
equal deleted inserted replaced
9520:017f1b58f68b 9521:b061a79d3d1a
   644 		cmd = elf_next(arf);
   644 		cmd = elf_next(arf);
   645 		(void) elf_end(arf);
   645 		(void) elf_end(arf);
   646 	} /* end while */
   646 	} /* end while */
   647 }
   647 }
   648 
   648 
   649 static void print_header(int);
       
   650 #ifndef XPG4
       
   651 static void print_with_uflag(SYM *, char *);
       
   652 #endif
       
   653 static void print_with_pflag(int, Elf *, unsigned int, SYM *, char *);
       
   654 static void print_with_Pflag(int, Elf *, unsigned int, SYM *);
       
   655 static void print_with_otherflags(int, Elf *, unsigned int,
       
   656 		SYM *, char *);
       
   657 /*
   649 /*
   658  * Print the symbol table according to the flags that were
   650  * Print the symbol table according to the flags that were
   659  * set, if any.  Input is an opened ELF file, the section name,
   651  * set, if any.  Input is an opened ELF file, the section name,
   660  * the section header, the section descriptor, and the filename.
   652  * the section header, the section descriptor, and the filename.
   661  * First get the symbol table with a call to elf_getdata.
   653  * First get the symbol table with a call to elf_getdata.
   676 	const int ndigits_arr[] = {
   668 	const int ndigits_arr[] = {
   677 		10,		/* FMT_T_DEC */
   669 		10,		/* FMT_T_DEC */
   678 		8,		/* FMT_T_HEX */
   670 		8,		/* FMT_T_HEX */
   679 		11,		/* FMT_T_OCT */
   671 		11,		/* FMT_T_OCT */
   680 	};
   672 	};
       
   673 	static void print_header(int);
   681 	int ndigits;
   674 	int ndigits;
       
   675 #ifndef XPG4
       
   676 	static void print_with_uflag(SYM *, char *);
       
   677 #endif
       
   678 	static void print_with_pflag(int, Elf *, unsigned int, SYM *, char *);
       
   679 	static void print_with_Pflag(int, Elf *, unsigned int, SYM *);
       
   680 	static void print_with_otherflags(int, Elf *, unsigned int,
       
   681 	    SYM *, char *);
   682 
   682 
   683 	/*
   683 	/*
   684 	 * Determine # of digits to use for each numeric value.
   684 	 * Determine # of digits to use for each numeric value.
   685 	 */
   685 	 */
   686 	ndigits = ndigits_arr[fmt_flag];
   686 	ndigits = ndigits_arr[fmt_flag];