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
This commit is contained in:
Luigi Rizzo 2009-01-06 14:10:30 +00:00
parent c825397790
commit 16c6e0979c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186824

View File

@ -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 */
};