summaryrefslogtreecommitdiffstats
path: root/usr.bin/nm/nm.c
AgeCommit message (Collapse)AuthorFilesLines
2019-03-03on malloc(3) failure, gracefully abort processing of the current fileschwarze1-1/+2
rather than crashing with a NULL pointer access; patch from Benjamin Baier <programmer at netzbasis dot de>; OK otto@ deraadt@
2017-10-27Use <elf.h> instead of <elf_abi.h>mpi1-2/+2
ok jasper@, jca@, deraadt@
2017-09-12Include room for NUL-termination when calculating the length of archivempi1-3/+3
member name. Fix an of by one found by sthen@ with MALLOC_OPTIONS=C. From Matthew Martin, ok deraadt@
2015-12-09Remove NULL-checks before free(). ok tb@mmcc1-5/+3
2015-11-13ratchet pledge from the start; from Theo Buehlerderaadt1-2/+8
2015-10-09Change all tame callers to namechange to pledge(2).deraadt1-3/+3
2015-10-05tame "stdio rpath" works fine, as long as we sidestep the demanglingderaadt1-1/+5
process which involves fork+execve.... ok doug
2015-08-13Grow -P (POSIX output) and -t (POSIX output radix) support. Several 3rd-partymiod1-55/+89
software depend upon this. Requested by feinerer@, ok millert@; manpage bits ok jmc@
2015-05-17Add 'D' to usage optstring. Prodded by jmc@guenther1-2/+2
2015-05-17Add -D option for displaying the dynamic symbol tableguenther1-3/+7
ok miod@
2015-04-09ELF weak symbols are _not_ like a.out indirect symbols. Nothing in ELF is,guenther1-15/+4
so remove N_INDR handling. ok kettenis@
2015-04-08Delete another piece of a.out detritusguenther1-10/+1
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt1-2/+2
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-04-28Ignore IRIX6-compatible archive map on mips64 platform, since the mips64miod1-1/+9
toolchain creates them. This lets nm -w correctly return 0 for valid archives. ok jasper@ deraadt@
2013-11-26unsigned char casts for ctypederaadt1-2/+2
ok krw
2013-11-12avoid math on void * pointers; delete an unused variablederaadt1-4/+6
2013-11-12remove more code accidentally left behind during the a.out purgederaadt1-4/+1
2013-10-24Redo 1.34+1.35, but ignore incorrect files in show_file() as done in 1.33.miod1-209/+23
Fixes nm output on archives on mips.
2013-10-24back out to 1.33, subtle bug being hunted...deraadt1-22/+212
2013-10-21remove a space that snuck into the outputderaadt1-2/+2
2013-10-19Remove a.out/stab knowledge from nm.deraadt1-212/+22
(As a side effect of this repair, the -e option no longer reports that all weak objects are functions) ok miod
2011-02-06- nm -s omitted the symbol list for first object file in an archive. fix thisjasper1-2/+6
by forcing show_symtab() to restore its original file offset after processing. fix from pr #6385. ok miod@
2009-10-27nm -V is silly, and prining the rcsid even more soderaadt1-18/+3
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt1-4/+4
2007-08-06the ellipsis is not an optional argument; while here, sync the usagesobrado1-3/+3
and synopsis of commands lots of good ideas by jmc@ ok jmc@
2005-01-03don't try to demangle C symbols if we're ELF.espie1-9/+9
looks okay mickey@
2004-10-10now that no cpu assumptions are left in -- remove the cross-gluemickey1-7/+2
2004-10-09move out elf code into elf.c and generate 32 and 64 versions of it;mickey1-198/+83
allow operation on size-mixed host-target as well as ensianess for both a.out and elf (though a.out 64bit probably does not exist ;) tested on hppa-sparc64-i386-vax intermixen
2004-07-11need to byteswap string table size before use for the alien endian a.outmickey1-2/+3
2004-05-04spacingderaadt1-12/+12
2004-04-29Correctly report empty a.out objects as "no name list" instead of "bad format".miod1-6/+11
ok mickey@ millert@
2004-01-14Fix the mmap case; inadequate testing on my part!millert1-18/+17
2004-01-14Fallback to malloc + pread if mmap fails; fixes "nm /dev/ksyms". OK mickey@millert1-39/+49
2004-01-13kill unused local vars; from deraadt@mickey1-3/+3
2004-01-05nm digs elf and merges w/ size; millert@ okmickey1-196/+686
2003-06-10mostly ansi cleanup; pval okderaadt1-34/+17
2003-06-03Remove the advertising clause in the UCB license which Berkeleymillert1-7/+3
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-05snprintf; ok miod ho henningderaadt1-4/+6
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert1-14/+14
2001-11-19kill more registersmpech1-3/+3
millert@ ok
2001-08-17Some missing protos. Use macros from <link.h> instead of rolling our own.espie1-20/+14
2001-08-17Show indirect symbols in -e mode.espie1-42/+69
2001-08-16-e switch, show extra symbol information such as weak symbol status.espie1-4/+38
2001-05-31- remove erealloc() wrapper functionsmart1-19/+8
- standard function prototypes - remove extraneous exit(1) after an err(1,...) Shrinks source by 11 lines and executable by 22 bytes on i386. deraadt@ ok
2001-02-18-C support.espie1-22/+63
Recognize -B, for better gnu-nm compatibility.
2000-11-10seperate -> separate, okay aaron@provos1-3/+3
1999-05-10Fixes endianess problems with old a.out tools. This makes buildingespie1-15/+15
some cross toolchains possible. This also changes some utilities's behavior slightly: - nm, strip, size now handle any a.out format they know about. - ranlib complains if it detects mixed archives (several object formats for different boxes). In the presence of mixed objects, you still have file, ranlib or ld to prevent you from getting too confused...
1998-05-11Build nm ok for cross-envsniklas1-2/+7
1997-05-31warn instead of warnx; kleinkderaadt1-3/+3
1997-04-04check MID field like strip(1) does; PR#149, mickey; fix by mederaadt1-3/+9