summaryrefslogtreecommitdiffstats
path: root/usr.bin/nm
AgeCommit message (Collapse)AuthorFilesLines
2020-11-22fix typo; from Kris Katterjohnjsg1-2/+2
2020-02-08correct Research Unix edition "appeared in" use in HISTORYjsg1-3/+3
Starting from "Combined Table of Contents" in Doug McIlroy's "A Research UNIX Reader" a table of which edition manuals appeared in. Checked against manuals from bitsavers/TUHS and source from TUHS where available. Ingo points out there are cases where something is included but not documented until a later release. bcd(6) v6 v7 printf(3) v2 v4 abort(3) v5 v6 system(3) v6 v7 fmod(3) v5 v6 ok schwarze@
2019-09-06More Version 1 AT&T UNIX history.schwarze1-3/+3
This became possible because copies of the original v1 manuals have shown up on the Internet some time ago. Reminded by Sevan Janiyan <venture37 at geeklan dot co dot uk>.
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@
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.millert1-2/+2
2018-12-14Delete unused phdr functions; move declarations for functions internal toguenther2-73/+13
elf.c to that file ok mpi@
2017-12-09recognize .openbsd.randomdata section and indicate it roughly, soderaadt1-1/+3
that objects within it are identified as being in read-only space. ok guenther
2017-10-27Use <elf.h> instead of <elf_abi.h>mpi2-4/+4
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@mmcc2-10/+6
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-09-15fix markup of the -t argumentschwarze1-7/+7
2015-08-13oops, SYNOPSIS was missing an Ar; while here i tweaked the list spacing;jmc1-3/+4
2015-08-13Grow -P (POSIX output) and -t (POSIX output radix) support. Several 3rd-partymiod5-95/+163
software depend upon this. Requested by feinerer@, ok millert@; manpage bits ok jmc@
2015-06-23This patch ensure that when an error is detected, the freed variables insemarie2-2/+9
elf_symloadx() are reinitialised. Else show_file() in nm.c will used these variables, even if they has just been freed. (nm.c +689). Problem found by afl. ok miod@
2015-06-23This patch ensure that e_shentsize (sections header's size in bytes) issemarie1-2/+7
big enough to fill at least one Elf_Shdr. While here, inverts calloc() arguments to be calloc(nmemb, size), according to fread() call after. This problem was found with afl, with e_shentsize=1. ok miod@
2015-06-23corrects a read after bound that occurs in strcmp (line justsemarie2-7/+11
after the added bound check). Found with afl. ok miod@
2015-06-23add some check before accessing data:semarie1-1/+11
- if section header table is be present - consistency of section header table size ok miod@
2015-05-17Add 'D' to usage optstring. Prodded by jmc@guenther1-2/+2
2015-05-17Add -D option for displaying the dynamic symbol tableguenther4-10/+19
ok miod@
2015-04-09ELF weak symbols are _not_ like a.out indirect symbols. Nothing in ELF is,guenther3-22/+8
so remove N_INDR handling. ok kettenis@
2015-04-08Delete another piece of a.out detritusguenther1-10/+1
2015-02-06SIZE_MAX is standard, we should be using it in preference to themillert1-3/+3
obsolete SIZE_T_MAX. OK miod@ beck@
2015-01-19Missing initialization; tjenahej@speedmail.semiod1-2/+2
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2-4/+4
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@
2014-04-09tweak STANDARDS; ok millert sobradojmc1-7/+6
2013-11-26unsigned char casts for ctypederaadt2-4/+4
ok krw
2013-11-13proto and such cleanupderaadt1-2/+5
ok guenther
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 purgederaadt2-111/+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-20catch up with elf(5)/stab(5) removal;jmc2-8/+5
ok miod
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
2013-03-30Correctly report `weak' status of non-function symbols. Makes nm agree withmiod1-3/+6
objdump -t on, say, _DYNAMIC in libpthread.
2011-09-28Support symbols in .tbss and .tdata ELF sectionsuwe2-6/+13
With this change nm(1) prints the expected symbol type ('B' or 'D') for variables in the .tbss and .tdata sections respectively, instead of '?'. This would be what binutils do for non-automatic variables that are marked as thread-local with the __thread attribute in GCC. help and ok miod@, guenther@
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-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt1-5/+1
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-10-27nm -V is silly, and prining the rcsid even more soderaadt2-23/+6
2009-02-10mark these utilities as being largely posix compliant or, in the case ofjmc1-2/+10
nm, as not being posix compliant;
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt2-9/+9
2007-08-06the ellipsis is not an optional argument; while here, sync the usagesobrado3-9/+9
and synopsis of commands lots of good ideas by jmc@ ok jmc@
2007-05-31convert to new .Dd format;jmc2-4/+4
2007-04-18Fix a NULL dereference if the symbol table size is zero; ok millert@ deraadt@miod1-2/+7
2007-02-08Do all allocation and deallocation of shstr in elf_symload() toray1-12/+3
prevent double-freeing shstr. Also don't free known NULL values (*pnames and *psnames). Initially inspired by Charles Longeau's first diff to tech@; he later sent a second diff to tech@ nearly identical to this commit. Freaky. OK mickey@.
2007-02-07check st_name validity also check for overflow and not only for zero; found by Charles Longeau <chl@tuxfamily.org>mickey1-3/+4