History log of /freebsd-11.0-release/usr.sbin/kldxref/kldxref.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 299878 16-May-2016 araujo

Use NULL instead of 0 for pointers.

MFC after: 2 weeks.


# 292078 11-Dec-2015 imp

Augment kldxref to find the new MODULE_PNP_INFO records now in
modules, simplify them into a more normal form and write them to
linker.hints.

Differential Review: https://reviews.freebsd.org/D3461


# 288490 02-Oct-2015 emaste

Add debug file extension to kldxref(8) after r288176

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


# 277205 15-Jan-2015 imp

Reserve and ignore the a new module metadata type MDT_PNP_INFO for
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


# 275940 19-Dec-2014 imp

Bump the largest record we can cope with from 1k to 8k. Other users of
the hints file don't have any real limits, and longer records will
need to be written shortly.


# 256650 16-Oct-2013 jilles

kldxref: Add static keyword to the new function only used in the same file.

The WARNS level is not such that the omission broke the build.

Reported by: mdf


# 256060 04-Oct-2013 jilles

kldxref: Do not depend on the directory order.

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


# 251439 05-Jun-2013 delphij

Remove unneeded reference to link.h (sys/link_elf.h).

MFC after: 2 weeks


# 186827 06-Jan-2009 luigi

various cleanups including:
+ 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


# 185475 30-Nov-2008 luigi

Make the linker.hints file have mode 644 instead of 600.
There is nothing secret in the file, and the missing read
permission breaks diskless operation.

MFC after: 4 weeks


# 161004 05-Aug-2006 imp

Use safe strlcpy rather than unsafe strncpy. After marcel's last fix,
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....


# 160982 04-Aug-2006 marcel

Fix (static) buffer overflow bug. The dest buffer is of size MAXPATHLEN,
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.


# 160818 29-Jul-2006 marcel

Change maketempfile() to return a FILE* so as to eliminate the fopen()
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.


# 152302 11-Nov-2005 ru

Skip .symbols files.


# 134361 27-Aug-2004 iedowse

Add support for reading ELF relocatable object file format modules.


# 134358 27-Aug-2004 iedowse

Call the file format specific code through a table of function
pointers and remove knowledge of the file format from kldxref.c.
This will make it possible to support more than one file format.


# 129930 01-Jun-2004 ru

Fixed manpage's synopsis, and synchronized it with the program's usage().


# 128742 30-Apr-2004 sobomax

Check that specified in the command line path is actually a directory,
otherwise we are risking to coredump later on.


# 127029 15-Mar-2004 des

Remove bogus (void **) casts. This unbreaks the -O2 build.


# 109607 21-Jan-2003 jake

Fix kldxref on sparc64 by allowing non-trivial relocations to be performed
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


# 95258 22-Apr-2002 des

Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.


# 88853 03-Jan-2002 jhb

Remove unnecessary machine/bootinfo.h includes.

Submitted by: jake


# 87551 09-Dec-2001 mikeh

WARNS=2 cleanup.

PR: bin/32567
MFC after: 2 weeks


# 83322 11-Sep-2001 peter

Add kldxref(8), for maintaining the linker.hints file for translating
module->pathname.ko. It supports only ELF for now.

Submitted by: bp (with some minor tweaks)