2001-09-11 01:13:15 +00:00
|
|
|
$FreeBSD$
|
|
|
|
|
2009-01-06 14:10:30 +00:00
|
|
|
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:
|
2001-09-11 01:13:15 +00:00
|
|
|
|
|
|
|
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 {
|
2009-01-06 14:10:30 +00:00
|
|
|
int type; /* type of data. currently MDT_* values */
|
2001-09-11 01:13:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
The rest of record depends on the type.
|
|
|
|
|
|
|
|
struct string {
|
2009-01-06 14:10:30 +00:00
|
|
|
uint8_t length; /* length of string */
|
2001-09-11 01:13:15 +00:00
|
|
|
char val[]; /* string itself (no terminating zero) */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct data_mdt_version {
|
|
|
|
int type = MDT_VERSION;
|
|
|
|
struct string modname;
|
2009-01-06 14:10:30 +00:00
|
|
|
/* padding */
|
2001-09-11 01:13:15 +00:00
|
|
|
int version;
|
|
|
|
struct string kldname;
|
2009-01-06 14:10:30 +00:00
|
|
|
/* padding */
|
2001-09-11 01:13:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct data_mdt_module {
|
2009-01-06 14:10:30 +00:00
|
|
|
int type = MDT_MODULE;
|
2001-09-11 01:13:15 +00:00
|
|
|
struct string modname;
|
|
|
|
struct string kldname;
|
2009-01-06 14:10:30 +00:00
|
|
|
/* padding */
|
2001-09-11 01:13:15 +00:00
|
|
|
};
|