OpenBSD CVS

CVS log for src/usr.bin/nm/nm.c


[BACK] Up to [local] / src / usr.bin / nm

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.55 / (download) - annotate - [select for diffs], Sun Dec 4 23:50:49 2022 UTC (17 months, 2 weeks ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.54: +1 -2 lines
Diff to previous 1.54 (colored)

userspace: remove vestigial '?' cases from top-level getopt(3) loops

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@

Revision 1.54 / (download) - annotate - [select for diffs], Sun Mar 3 16:07:39 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.53: +2 -1 lines
Diff to previous 1.53 (colored)

on malloc(3) failure, gracefully abort processing of the current file
rather than crashing with a NULL pointer access;
patch from Benjamin Baier <programmer at netzbasis dot de>;
OK otto@ deraadt@

Revision 1.53 / (download) - annotate - [select for diffs], Fri Oct 27 16:47:08 2017 UTC (6 years, 6 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Use <elf.h> instead of <elf_abi.h>

ok jasper@, jca@, deraadt@

Revision 1.52 / (download) - annotate - [select for diffs], Tue Sep 12 08:32:44 2017 UTC (6 years, 8 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

Include room for NUL-termination when calculating the length of archive
member name.

Fix an of by one found by sthen@ with MALLOC_OPTIONS=C.

From Matthew Martin, ok deraadt@

Revision 1.51 / (download) - annotate - [select for diffs], Wed Dec 9 19:28:34 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.50: +3 -5 lines
Diff to previous 1.50 (colored)

Remove NULL-checks before free(). ok tb@

Revision 1.50 / (download) - annotate - [select for diffs], Fri Nov 13 15:22:44 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.49: +8 -2 lines
Diff to previous 1.49 (colored)

ratchet pledge from the start; from Theo Buehler

Revision 1.49 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:08 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.48 / (download) - annotate - [select for diffs], Mon Oct 5 07:16:03 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.47: +5 -1 lines
Diff to previous 1.47 (colored)

tame "stdio rpath" works fine, as long as we sidestep the demangling
process which involves fork+execve....
ok doug

Revision 1.47 / (download) - annotate - [select for diffs], Thu Aug 13 19:13:28 2015 UTC (8 years, 9 months ago) by miod
Branch: MAIN
Changes since 1.46: +89 -55 lines
Diff to previous 1.46 (colored)

Grow -P (POSIX output) and -t (POSIX output radix) support. Several 3rd-party
software depend upon this.

Requested by feinerer@, ok millert@; manpage bits ok jmc@

Revision 1.46 / (download) - annotate - [select for diffs], Sun May 17 21:41:50 2015 UTC (9 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Add 'D' to usage optstring.  Prodded by jmc@

Revision 1.45 / (download) - annotate - [select for diffs], Sun May 17 20:19:08 2015 UTC (9 years ago) by guenther
Branch: MAIN
Changes since 1.44: +7 -3 lines
Diff to previous 1.44 (colored)

Add -D option for displaying the dynamic symbol table

ok miod@

Revision 1.44 / (download) - annotate - [select for diffs], Thu Apr 9 04:46:18 2015 UTC (9 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.43: +4 -15 lines
Diff to previous 1.43 (colored)

ELF weak symbols are _not_ like a.out indirect symbols.  Nothing in ELF is,
so remove N_INDR handling.

ok kettenis@

Revision 1.43 / (download) - annotate - [select for diffs], Wed Apr 8 04:23:15 2015 UTC (9 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.42: +1 -10 lines
Diff to previous 1.42 (colored)

Delete another piece of a.out detritus

Revision 1.42 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:10 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
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)

Revision 1.41 / (download) - annotate - [select for diffs], Mon Apr 28 18:49:28 2014 UTC (10 years ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.40: +9 -1 lines
Diff to previous 1.40 (colored)

Ignore IRIX6-compatible archive map on mips64 platform, since the mips64
toolchain creates them. This lets nm -w correctly return 0 for valid archives.

ok jasper@ deraadt@

Revision 1.40 / (download) - annotate - [select for diffs], Tue Nov 26 13:19:07 2013 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

unsigned char casts for ctype
ok krw

Revision 1.39 / (download) - annotate - [select for diffs], Tue Nov 12 19:37:39 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.38: +6 -4 lines
Diff to previous 1.38 (colored)

avoid math on void * pointers; delete an unused variable

Revision 1.38 / (download) - annotate - [select for diffs], Tue Nov 12 14:07:53 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.37: +1 -4 lines
Diff to previous 1.37 (colored)

remove more code accidentally left behind during the a.out purge

Revision 1.37 / (download) - annotate - [select for diffs], Thu Oct 24 19:53:43 2013 UTC (10 years, 6 months ago) by miod
Branch: MAIN
Changes since 1.36: +23 -209 lines
Diff to previous 1.36 (colored)

Redo 1.34+1.35, but ignore incorrect files in show_file() as done in 1.33.
Fixes nm output on archives on mips.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Oct 24 18:28:03 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.35: +212 -22 lines
Diff to previous 1.35 (colored)

back out to 1.33, subtle bug being hunted...

Revision 1.35 / (download) - annotate - [select for diffs], Mon Oct 21 02:59:52 2013 UTC (10 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

remove a space that snuck into the output

Revision 1.34 / (download) - annotate - [select for diffs], Sat Oct 19 08:59:48 2013 UTC (10 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.33: +22 -212 lines
Diff to previous 1.33 (colored)

Remove a.out/stab knowledge from nm.
(As a side effect of this repair, the -e option no longer reports that
all weak objects are functions)
ok miod

Revision 1.33 / (download) - annotate - [select for diffs], Sun Feb 6 18:34:00 2011 UTC (13 years, 3 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.32: +6 -2 lines
Diff to previous 1.32 (colored)

- nm -s omitted the symbol list for first object file in an archive. fix this
  by forcing show_symtab() to restore its original file offset after processing.

  fix from pr #6385.
  ok miod@

Revision 1.32 / (download) - annotate - [select for diffs], Tue Oct 27 23:51:21 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.31: +3 -18 lines
Diff to previous 1.31 (colored)

nm -V is silly, and prining the rcsid even more so

Revision 1.31 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:33 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.30: +4 -4 lines
Diff to previous 1.30 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.30 / (download) - annotate - [select for diffs], Mon Aug 6 19:16:06 2007 UTC (16 years, 9 months ago) by sobrado
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

the ellipsis is not an optional argument; while here, sync the usage
and synopsis of commands

lots of good ideas by jmc@

ok jmc@

Revision 1.29 / (download) - annotate - [select for diffs], Mon Jan 3 14:49:39 2005 UTC (19 years, 4 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.28: +9 -9 lines
Diff to previous 1.28 (colored)

don't try to demangle C symbols if we're ELF.
looks okay mickey@

Revision 1.28 / (download) - annotate - [select for diffs], Sun Oct 10 16:45:00 2004 UTC (19 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.27: +2 -7 lines
Diff to previous 1.27 (colored)

now that no cpu assumptions are left in -- remove the cross-glue

Revision 1.27 / (download) - annotate - [select for diffs], Sat Oct 9 20:26:57 2004 UTC (19 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.26: +84 -199 lines
Diff to previous 1.26 (colored)

move out elf code into elf.c and generate 32 and 64 versions of it;
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

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jul 11 07:08:46 2004 UTC (19 years, 10 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.25: +3 -2 lines
Diff to previous 1.25 (colored)

need to byteswap string table size before use for the alien endian a.out

Revision 1.25 / (download) - annotate - [select for diffs], Tue May 4 23:09:07 2004 UTC (20 years ago) by deraadt
Branch: MAIN
Changes since 1.24: +12 -12 lines
Diff to previous 1.24 (colored)

spacing

Revision 1.24 / (download) - annotate - [select for diffs], Thu Apr 29 13:34:37 2004 UTC (20 years ago) by miod
Branch: MAIN
Changes since 1.23: +11 -6 lines
Diff to previous 1.23 (colored)

Correctly report empty a.out objects as "no name list" instead of "bad format".

ok mickey@ millert@

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jan 14 04:23:26 2004 UTC (20 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.22: +17 -18 lines
Diff to previous 1.22 (colored)

Fix the mmap case; inadequate testing on my part!

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jan 14 02:52:04 2004 UTC (20 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.21: +49 -39 lines
Diff to previous 1.21 (colored)

Fallback to malloc + pread if mmap fails; fixes "nm /dev/ksyms".  OK mickey@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jan 13 17:32:32 2004 UTC (20 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

kill unused local vars; from deraadt@

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jan 5 01:27:22 2004 UTC (20 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.19: +688 -198 lines
Diff to previous 1.19 (colored)

nm digs elf and merges w/ size; millert@ ok

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:49 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.18: +17 -34 lines
Diff to previous 1.18 (colored)

mostly ansi cleanup; pval ok

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:14 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.17: +3 -7 lines
Diff to previous 1.17 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Apr 5 17:15:06 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.16: +6 -4 lines
Diff to previous 1.16 (colored)

snprintf; ok miod ho henning

Revision 1.16 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:50 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.15: +14 -14 lines
Diff to previous 1.15 (colored)

Part 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.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Nov 19 19:02:15 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

kill more registers

millert@ ok

Revision 1.14 / (download) - annotate - [select for diffs], Fri Aug 17 16:29:33 2001 UTC (22 years, 9 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.13: +14 -20 lines
Diff to previous 1.13 (colored)

Some missing protos. Use macros from <link.h> instead of rolling our own.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Aug 17 14:25:26 2001 UTC (22 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.12: +69 -42 lines
Diff to previous 1.12 (colored)

Show indirect symbols in -e mode.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Aug 16 15:45:05 2001 UTC (22 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.11: +38 -4 lines
Diff to previous 1.11 (colored)

-e switch, show extra symbol information such as weak symbol status.

Revision 1.11 / (download) - annotate - [select for diffs], Thu May 31 16:28:51 2001 UTC (22 years, 11 months ago) by smart
Branch: MAIN
Changes since 1.10: +8 -19 lines
Diff to previous 1.10 (colored)

- remove erealloc() wrapper function
- 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

Revision 1.10 / (download) - annotate - [select for diffs], Sun Feb 18 21:45:09 2001 UTC (23 years, 3 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.9: +63 -22 lines
Diff to previous 1.9 (colored)

-C support.
Recognize -B, for better gnu-nm compatibility.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Nov 10 15:33:12 2000 UTC (23 years, 6 months ago) by provos
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

seperate -> separate, okay aaron@

Revision 1.8 / (download) - annotate - [select for diffs], Mon May 10 16:14:07 1999 UTC (25 years ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.7: +15 -15 lines
Diff to previous 1.7 (colored)

Fixes endianess problems with old a.out tools. This makes building
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...

Revision 1.7 / (download) - annotate - [select for diffs], Mon May 11 20:34:58 1998 UTC (26 years ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.6: +7 -2 lines
Diff to previous 1.6 (colored)

Build nm ok for cross-envs

Revision 1.6 / (download) - annotate - [select for diffs], Sat May 31 08:26:19 1997 UTC (26 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

warn instead of warnx; kleink

Revision 1.5 / (download) - annotate - [select for diffs], Fri Apr 4 18:27:07 1997 UTC (27 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.4: +9 -3 lines
Diff to previous 1.4 (colored)

check MID field like strip(1) does; PR#149, mickey; fix by me

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jan 15 23:42:59 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jun 26 05:37:33 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

rcsid

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jan 16 00:57:11 1996 UTC (28 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +22 -36 lines
Diff to previous 1.1 (colored)

from netbsd; Use err() & warn()

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:52 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:52 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.