History log of /freebsd-10-stable/usr.sbin/kldxref/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
313848 17-Feb-2017 emaste

MFC r313563: kldxref: bump MAXSEGS to 3

ld.bfd generates two PT_LOAD segments, but certain linkers or linker
configurations generate three PT_LOAD segments (one additional for
RELRO).

PR: 216975

313847 17-Feb-2017 emaste

MFC r313562: kldxref: s/sections/segments/ in warning message

The message refers to program header segments, not sections.

PR: 216975

298494 22-Apr-2016 emaste

MFC r288490: Add debug file extension to kldxref(8)

After r288176 [in head] kernel debug files have the extension .debug.
They also moved [in head] 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.

Merged this change to avoid warnings when a stable/10 kldxref runs
against a head install, perhaps on an upgrade to 11-CURRENT. The change
to kernel debug files will not be merged to stable/10.

298493 22-Apr-2016 emaste

MFC r277205 (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.

298492 22-Apr-2016 emaste

MFC r275940 (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.

269014 23-Jul-2014 emaste

MFC r265157: kldxref: Clean up error reporting

Omit "too many sections" warnings if the ELF file is not dynamically
linked (and is therefore skipped anyway), and otherwise output it only
once. An errant core file would previously cause kldxref to output a
number of warnings.

Also introduce a MAXSEGS #define and replace literal 2 with it, to make
comparisons clear.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation

259751 22-Dec-2013 jilles

MFC r256650: 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.

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

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


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


251440 05-Jun-2013 delphij

Use calloc().

MFC after: 2 weeks


251439 05-Jun-2013 delphij

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

MFC after: 2 weeks


242277 29-Oct-2012 kientzle

Clarify a warning message.


237258 19-Jun-2012 eadler

Remove variables which are initialized but never used thereafter reported by gcc46 warning

Approved by: cperciva
MFC After: 3 days


228976 30-Dec-2011 uqs

Reencode files to UTF-8. Drop CP1252 em-dash.


211934 28-Aug-2010 nwhitehorn

Repair some build breakage introduced in r211725 and garbage collect some
code made obsolete in the same commit.


211725 23-Aug-2010 imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.


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


186826 06-Jan-2009 luigi

fix a couple of innocuous compiler warnings

MFC after: 3 days


186824 06-Jan-2009 luigi

correct description of how a string is stored, fix a few
typos and reference the kernel file which processes this info.

All in all, the content of this file should be moved to kldxref.c
or to the kld(4) manpage.

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


173766 20-Nov-2007 jb

These are the things that the tinderbox has problems with because it
doesn't use the default CFLAGS which contain -fno-strict-aliasing.

Until the code is cleaned up, just add -fno-strict-aliasing to the
CFLAGS of these for the tinderboxes' sake, allowing the rest of the
tree to have -Werror enabled again.


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


160984 04-Aug-2006 marcel

Build shared on PowerPC now that the bug has been found and fixed.


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.


160842 30-Jul-2006 marcel

Use NO_SHARED=YES to force a static link.

Pointed out by: ru@


160820 29-Jul-2006 marcel

Link kldxref(8) static on PowerPC to work around a SIGSEGV that
cannot easily be analyzed due to there being no debugger yet.
The SIGSEGV only happens when kldxref is linked shared.
Since kldxref(8) is needed for a release build, having it not
dump core is important.


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.


154251 12-Jan-2006 jasone

Use posix_memalign() rather than assuming that malloc() provides adequate
alignment.

Approved by: markm (mentor)


153504 18-Dec-2005 marcel

Make our ELF64 type definitions match standards. In particular this
means:
o Remove Elf64_Quarter,
o Redefine Elf64_Half to be 16-bit,
o Redefine Elf64_Word to be 32-bit,
o Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o Use Elf_Size in MI code to abstract the difference between
Elf32_Word and Elf64_Word.
o Add Elf_Ssize as the signed counterpart of Elf_Size.

MFC after: 2 weeks


153503 18-Dec-2005 marcel

Explicitly cast ELF_R_TYPE() to the right type.


152302 11-Nov-2005 ru

Skip .symbols files.


143094 03-Mar-2005 grehan

Doh, erase unused variable...


143031 02-Mar-2005 grehan

PowerPC support for kldxref by handling the PPC-specific relocations.


134450 28-Aug-2004 iedowse

Explicitly pass in the relocation base and data offset into ef_reloc()
rather than relying on a trick that happens to work for the current
relocation schemes. Also add some comments and improve variable
naming.


134373 27-Aug-2004 iedowse

Use a temporary void * variable to work around a strict aliasing
warning that gcc generates at -O2 and higher.


134362 27-Aug-2004 iedowse

Add MD relocation support for amd64 and i386 platforms. The no-op
relocation is not sufficient for ELF relocatable object format
modules, since accessing the module metadata involves following
pointers between different ELF sections.

This allows kldxref to correctly build linker.hints on the amd64
platform.


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.


124963 25-Jan-2004 des

I don't normally use my middle name, so remove it from attributions in
man pages (though not from copyright notices). While I'm here, add email
addresses where appropriate.


113091 04-Apr-2003 obrien

style.Makefile(5)


111850 03-Mar-2003 ru

3rd party modules live in /boot/modules nowadays.


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


100272 17-Jul-2002 peter

This is a userland tool, not a kernel component or libstand client.


99968 14-Jul-2002 charnier

The .Nm utility


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}/.


94414 11-Apr-2002 peter

Make kldxref work for Elf64 (which has 32 bit hash tables)


88853 03-Jan-2002 jhb

Remove unnecessary machine/bootinfo.h includes.

Submitted by: jake


87629 10-Dec-2001 mikeh

Reorder WARNS line for style.

Pointed out by: bde


87551 09-Dec-2001 mikeh

WARNS=2 cleanup.

PR: bin/32567
MFC after: 2 weeks


86777 22-Nov-2001 ru

mdoc(7) police: oops, didn't catch this one without ispell(1).


86776 22-Nov-2001 ru

mdoc(7) police: tiny markup fixes.


84829 12-Oct-2001 des

Write a real man page.


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)