mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
16c6e0979c
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
46 lines
955 B
Plaintext
46 lines
955 B
Plaintext
$FreeBSD$
|
|
|
|
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;
|
|
|
|
All subsequent records have following format:
|
|
|
|
struct record {
|
|
int length; /* length of following data */
|
|
char data[length];
|
|
};
|
|
|
|
Each record is aligned on sizeof(int) boundary. First integer of the field
|
|
'data' determines its type:
|
|
|
|
struct data {
|
|
int type; /* type of data. currently MDT_* values */
|
|
};
|
|
|
|
The rest of record depends on the type.
|
|
|
|
struct 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_MODULE;
|
|
struct string modname;
|
|
struct string kldname;
|
|
/* padding */
|
|
};
|