summaryrefslogtreecommitdiff
path: root/usr.bin/nm
AgeCommit message (Collapse)Author
2024-05-21remove prototypes with no matching function and externs with no varJonathan Gray
partly checked by millert@
2022-12-04userspace: remove vestigial '?' cases from top-level getopt(3) loopsScott Soule Cheloha
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines. Prompted by dlg@. With help from dlg@ and millert@. Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2 ok naddy@ millert@ dlg@
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2021-11-07nm: add some .text.* support for symbolsSebastien Marie
.text.* are generated when using -ffunction-sections. makes nm(1) to correctly identify the function symbols as N_TEXT. found while debugging librsvg build error, where some symbols where not found by libtool(1) (which is using nm(1)). ok gkoehler@
2020-11-22fix typo; from Kris KatterjohnJonathan Gray
2020-02-08correct Research Unix edition "appeared in" use in HISTORYJonathan Gray
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.Ingo Schwarze
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 fileIngo Schwarze
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.Todd C. Miller
2018-12-14Delete unused phdr functions; move declarations for functions internal toPhilip Guenther
elf.c to that file ok mpi@
2017-12-09recognize .openbsd.randomdata section and indicate it roughly, soTheo de Raadt
that objects within it are identified as being in read-only space. ok guenther
2017-10-27Use <elf.h> instead of <elf_abi.h>Martin Pieuchot
ok jasper@, jca@, deraadt@
2017-09-12Include room for NUL-termination when calculating the length of archiveMartin Pieuchot
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@mmcc
2015-11-13ratchet pledge from the start; from Theo BuehlerTheo de Raadt
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-05tame "stdio rpath" works fine, as long as we sidestep the demanglingTheo de Raadt
process which involves fork+execve.... ok doug
2015-09-15fix markup of the -t argumentIngo Schwarze
2015-08-13oops, SYNOPSIS was missing an Ar; while here i tweaked the list spacing;Jason McIntyre
2015-08-13Grow -P (POSIX output) and -t (POSIX output radix) support. Several 3rd-partyMiod Vallat
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 insemarie
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) issemarie
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 justsemarie
after the added bound check). Found with afl. ok miod@
2015-06-23add some check before accessing data:semarie
- 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@Philip Guenther
2015-05-17Add -D option for displaying the dynamic symbol tablePhilip Guenther
ok miod@
2015-04-09ELF weak symbols are _not_ like a.out indirect symbols. Nothing in ELF is,Philip Guenther
so remove N_INDR handling. ok kettenis@
2015-04-08Delete another piece of a.out detritusPhilip Guenther
2015-02-06SIZE_MAX is standard, we should be using it in preference to theTodd C. Miller
obsolete SIZE_T_MAX. OK miod@ beck@
2015-01-19Missing initialization; tjenahej@speedmail.seMiod Vallat
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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 mips64Miod Vallat
toolchain creates them. This lets nm -w correctly return 0 for valid archives. ok jasper@ deraadt@
2014-04-09tweak STANDARDS; ok millert sobradoJason McIntyre
2013-11-26unsigned char casts for ctypeTheo de Raadt
ok krw
2013-11-13proto and such cleanupTheo de Raadt
ok guenther
2013-11-12avoid math on void * pointers; delete an unused variableTheo de Raadt
2013-11-12remove more code accidentally left behind during the a.out purgeTheo de Raadt
2013-10-24Redo 1.34+1.35, but ignore incorrect files in show_file() as done in 1.33.Miod Vallat
Fixes nm output on archives on mips.
2013-10-24back out to 1.33, subtle bug being hunted...Theo de Raadt
2013-10-21remove a space that snuck into the outputTheo de Raadt
2013-10-20catch up with elf(5)/stab(5) removal;Jason McIntyre
ok miod
2013-10-19Remove a.out/stab knowledge from nm.Theo de Raadt
(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 withMiod Vallat
objdump -t on, say, _DYNAMIC in libpthread.
2011-09-28Support symbols in .tbss and .tdata ELF sectionsUwe Stuehler
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 thisJasper Lievisse Adriaanse
by forcing show_symtab() to restore its original file offset after processing. fix from pr #6385. ok miod@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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 soTheo de Raadt
2009-02-10mark these utilities as being largely posix compliant or, in the case ofJason McIntyre
nm, as not being posix compliant;
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-08-06the ellipsis is not an optional argument; while here, sync the usageIgor Sobrado
and synopsis of commands lots of good ideas by jmc@ ok jmc@