summaryrefslogtreecommitdiffstats
path: root/usr.sbin/kldxref/kldxref.c
Commit message (Collapse)AuthorAgeFilesLines
* Use NULL instead of 0 for pointers.araujo2016-05-161-1/+1
| | | | MFC after: 2 weeks.
* Augment kldxref to find the new MODULE_PNP_INFO records now inimp2015-12-111-3/+344
| | | | | | | modules, simplify them into a more normal form and write them to linker.hints. Differential Review: https://reviews.freebsd.org/D3461
* Add debug file extension to kldxref(8) after r288176emaste2015-10-021-1/+4
| | | | | | | | | | | After r288176 kernel debug files have the extension .debug. They also moved to /usr/lib/debug/boot/kernel by default so in the normal case kldxref does not encounter them. A src.conf(5) setting may be used to continue installing them in /boot/kernel though, so have kldxref skip .debug files in addition to .symbols files. Reported by: fabient Sponsored by: The FreeBSD Foundation
* Reserve and ignore the a new module metadata type MDT_PNP_INFO forimp2015-01-151-0/+4
| | | | | | | | | | associating an optional PNP hint table with this module. In the future, when these are added, these changes will silently ignore the new type they would otherwise warn about. It will always be safe to ignore this data. Get this into the builds today for some future proofing. MFC After: 3 days
* Bump the largest record we can cope with from 1k to 8k. Other users ofimp2014-12-191-1/+1
| | | | | the hints file don't have any real limits, and longer records will need to be written shortly.
* kldxref: Add static keyword to the new function only used in the same file.jilles2013-10-161-1/+1
| | | | | | The WARNS level is not such that the omission broke the build. Reported by: mdf
* kldxref: Do not depend on the directory order.jilles2013-10-041-1/+11
| | | | | | | | | | | | | | | | Sort the filenames to get a consistent result between machines of the same architecture. Also, sort FTS_D entries after other entries so kldxref -R works properly in the uncommon case that a directory contains both subdirectories and modules. Previously, this may have happened to work, depending on the order of files in the directory. PR: bin/182098 Submitted by: Derek Schrock (original version) Tested by: Derek Schrock Approved by: re (delphij) MFC after: 1 week
* Remove unneeded reference to link.h (sys/link_elf.h).delphij2013-06-051-1/+0
| | | | MFC after: 2 weeks
* various cleanups including:luigi2009-01-061-82/+77
| | | | | | | | | + check a possible buffer overflow when creating a temp file, submitted by Christoph Mallon + remove stale struct definitions + clarify the use of dflag and remove useless checks MFC after: 3 days
* Make the linker.hints file have mode 644 instead of 600.luigi2008-11-301-0/+2
| | | | | | | There is nothing secret in the file, and the missing read permission breaks diskless operation. MFC after: 4 weeks
* Use safe strlcpy rather than unsafe strncpy. After marcel's last fix,imp2006-08-051-4/+2
| | | | | | there was still one overflow possible. strlcpy is faster anyway because it doesn't unexpectedly zero the entire length of the string when copying short strings....
* Fix (static) buffer overflow bug. The dest buffer is of size MAXPATHLEN,marcel2006-08-041-1/+1
| | | | | | so dest[MAXPATHLEN] falls outside the buffer. This bug corrupted arenas[0] defined in libc's malloc.c on PowerPC when kldxref is shared, which triggered a delayed SIGSERV.
* Change maketempfile() to return a FILE* so as to eliminate the fopen()marcel2006-07-291-6/+7
| | | | | | | | | | that immediately follows the only call to it. maketempfile() uses mkstemp(), so the temporary file has already been opened and using fopen() again just opens the file twice. This also fixes the invalid mode used on the fopen(). While here, assign NULL to fxref after fclose() because we test for fxref being !NULL to determine if we have the (temporary) hints file open.
* Skip .symbols files.ru2005-11-111-1/+4
|
* Add support for reading ELF relocatable object file format modules.iedowse2004-08-271-3/+6
|
* Call the file format specific code through a table of functioniedowse2004-08-271-16/+18
| | | | | pointers and remove knowledge of the file format from kldxref.c. This will make it possible to support more than one file format.
* Fixed manpage's synopsis, and synchronized it with the program's usage().ru2004-06-011-1/+1
|
* Check that specified in the command line path is actually a directory,sobomax2004-04-301-0/+9
| | | | otherwise we are risking to coredump later on.
* Remove bogus (void **) casts. This unbreaks the -O2 build.des2004-03-151-3/+3
|
* Fix kldxref on sparc64 by allowing non-trivial relocations to be performedjake2003-01-211-2/+3
| | | | | | | | | on variables read out of raw kld files. Unlike other platforms the value will be in an Elf_Rela, not in the data section of the elf file. Submitted by: Hartmut Brandt <brandt@fokus.gmd.de> PR: 46730 Tested on: alpha (obrien), i386, sparc64
* Usage style sweep: spell "usage" with a small 'u'.des2002-04-221-1/+1
| | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/.
* Remove unnecessary machine/bootinfo.h includes.jhb2002-01-031-1/+0
| | | | Submitted by: jake
* WARNS=2 cleanup.mikeh2001-12-091-1/+2
| | | | | PR: bin/32567 MFC after: 2 weeks
* Add kldxref(8), for maintaining the linker.hints file for translatingpeter2001-09-111-0/+346
module->pathname.ko. It supports only ELF for now. Submitted by: bp (with some minor tweaks)
OpenPOWER on IntegriCloud