summaryrefslogtreecommitdiff
path: root/usr.sbin/kvm_mkdb/nlist.c
AgeCommit message (Collapse)Author
2015-08-20stdlib.h is in scope; do not cast malloc/calloc/realloc*Theo de Raadt
ok millert krw
2015-01-18do not require <a.out.h>Theo de Raadt
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-05-20Use errc/warnc to simplify code.Philip Guenther
Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
2013-11-12remove the code that iterates over binary types, since everything is nowTheo de Raadt
ELF.
2013-10-15tedu a.out supportTheo de Raadt
2013-08-22Correct format string mismatches turned up by -Wformat=2Philip Guenther
suggestions and ok millert@
2013-01-29Allow for a kernel linked at address zero; ok guenther@ millert@Miod Vallat
2012-04-06iterate over e_shnum using Elf32_Word instead of intTheo de Raadt
2009-11-11patch a whole bunch of memory leaks, parfait only spotted one of themTheo de Raadt
ok miod jsg
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
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-03-18do not use section names for locating a string tab; miod@ okMichael Shalayeff
2003-09-25realloc fixes; markus okTheo de Raadt
2003-06-26ansi and protosTheo de Raadt
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-06use snamesize and realloc properly. ok tdeval@Ted Unangst
2003-04-04strlcpy; tedu okTheo de Raadt
2002-11-30be better about the STT_NOTYPE symbols, not all become N_UNDEF this way; ↵Michael Shalayeff
pefo@ ok
2002-10-25prepend the underscore always for elf, this makes kvm_bsd.db work on elf ↵Michael Shalayeff
platforms; drahn@ millert@ ok
2002-09-06fopen() does not return < 0Theo de Raadt
2002-05-30minor KNFTheo de Raadt
2002-03-25bring in prototypesTheo de Raadt
2002-03-14kill more registers.Mike Pechkin
millert@ ok
2002-02-20Fix ELF so it works with /dev/ksyms. Also make 'detection' of ksymsPer Fogelstrom
a little more robust by looking at the actual namelist filename.
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-05-11MAP_COPY -> MAP_SHARED (it's ok in this case (/dev/ksyms))Artur Grabowski
2001-02-03ELF: fallback to malloc when mmap fails. for /dev/ksyms.Artur Grabowski
2001-01-25Make nlist elf-size independent.Artur Grabowski
2000-06-30warnx?/errx? paranoia (use "%s" not a bare string unless it is aTodd C. Miller
constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales).
1999-03-24Only exit in nlist.c due to a memory error, otherwise just return. A return ↵Todd C. Miller
value of 1 indicates an incorrect executable type, a return value of -1 indicates some other problem. This gives us better fallback from /dev/ksyms to /bsd.
1998-12-19back out recently added sanity check for data and bss as ksyms has neitherTodd C. Miller
1998-11-29Blow up a little more verbosely if something's feeding us garbage.Jason Downs
1998-10-28uninitialized variable; hgweigand@wiesbaden.netsurf.deTodd C. Miller
1998-09-26if malloc fails, say how much we tried to allocTodd C. Miller
1998-08-23o If the user doesn't specify a file, use /dev/ksyms in preference toTodd C. Miller
/bsd if it exists and we can open it. o Fix a bug where kvm_mkdb would leave a temp file in /var/db if the file argument didn't exit.
1998-08-21oops, remove debugging infoTodd C. Miller
1998-08-21Changes to work with /dev/ksyms:Todd C. Miller
o If we are have no data segment and text seg is __LDPGSZ, we must be /dev/ksyms or an equivalent so use sysctl to get version string. o fix an int vs. long issue and prepend '_' to symbols that lack one (alpha for instance).
1998-08-20ecoff support, based on libc/gen/nlist.cTodd C. Miller
1998-08-19clean up our temp files on failureTodd C. Miller
1998-08-19Make kvm_mkdb work againTodd C. Miller
o testdb() needs to take as an arg the name of the kernel so it can do the version test correctly. o add undocumented verbose flag to tell when we are rebuilding the .db file o DO_* -> _NLIST_DO_*, this prevented kvm_mkdb from doing anything at all. o preserve a few error messages so you get error output when none of the exec types match the target. o check malloc return values o get_kerntext should not subtract the sizeof(struct exec) from kernel_text
1997-12-15use MAP_PRIVATE|MAP_FILE; mrgTheo de Raadt
1997-01-15From NetBSD: make testdb() fail if database version string has length zero.Todd C. Miller
Also, KNF, b* -> mem*, getopt tests against -1, not EOF, and index -> strchr. Added OpenBSD tags.
1996-07-31comment an #endifTheo de Raadt
1996-07-31zmagic/qmagic has kernel offset problem; netbsd pr#2665, leo@marco.de.Theo de Raadt
also rely on machine/exec.h DO_{AOUT,ELF,...} symbols, and declare a stub ecoff handler for niklas to finish writing (stealable from libc)
1996-05-24get_kerntextTheo de Raadt
1996-05-17Addition of elf support.Per Fogelstrom
1995-10-18initial import of NetBSD treeTheo de Raadt