]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.sbin/kldxref/fileformat
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.sbin / kldxref / fileformat
1 $FreeBSD$
2
3 linker.hints file consists from the one or more records,
4 and is processed by sys/kern/kern_linker.c::linker_hints_lookup()
5
6 First record of file is special and determines its version:
7
8 int     version;
9
10     All subsequent records have following format:
11     
12 struct record {
13         int     length;         /* length of following data */
14         char    data[length];
15 };
16
17     Each record is aligned on sizeof(int) boundary. First integer of the field
18 'data' determines its type:
19
20 struct data {
21         int     type;           /* type of data. currently MDT_* values */
22 };
23
24     The rest of record depends on the type.
25
26 struct string {
27         uint8_t length;         /* length of string */
28         char    val[];          /* string itself (no terminating zero) */
29 };
30
31 struct data_mdt_version {
32         int     type = MDT_VERSION;
33         struct string   modname;
34         /* padding */
35         int     version;
36         struct string   kldname;
37         /* padding */
38 };
39
40 struct data_mdt_module {
41         int     type = MDT_MODULE;
42         struct string   modname;
43         struct string   kldname;
44         /* padding */
45 };