From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 14:10:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F0C1065678; Tue, 6 Jan 2009 14:10:30 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73F958FC16; Tue, 6 Jan 2009 14:10:30 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06EAUDG033201; Tue, 6 Jan 2009 14:10:30 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EAUTa033200; Tue, 6 Jan 2009 14:10:30 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061410.n06EAUTa033200@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 14:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186824 - head/usr.sbin/kldxref X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:10:31 -0000 Author: luigi Date: Tue Jan 6 14:10:30 2009 New Revision: 186824 URL: http://svn.freebsd.org/changeset/base/186824 Log: 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 Modified: head/usr.sbin/kldxref/fileformat Modified: head/usr.sbin/kldxref/fileformat ============================================================================== --- head/usr.sbin/kldxref/fileformat Tue Jan 6 14:10:10 2009 (r186823) +++ head/usr.sbin/kldxref/fileformat Tue Jan 6 14:10:30 2009 (r186824) @@ -1,7 +1,9 @@ $FreeBSD$ - linker.hints file consists from the one or more records. First record of -file is special and determines its version: +linker.hints file consists from the one or more records, +and is processed by sys/kern/kern_linker.c::linker_hints_lookup() + +First record of file is special and determines its version: int version; @@ -16,25 +18,28 @@ struct record { 'data' determines its type: struct data { - int type; /* type of data. currently MTD_* values */ + int type; /* type of data. currently MDT_* values */ }; The rest of record depends on the type. struct string { - int length; /* length of string */ + uint8_t length; /* length of string */ char val[]; /* string itself (no terminating zero) */ }; struct data_mdt_version { int type = MDT_VERSION; struct string modname; + /* padding */ int version; struct string kldname; + /* padding */ }; struct data_mdt_module { - int type = MDT_VERSION; + int type = MDT_MODULE; struct string modname; struct string kldname; + /* padding */ };