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