xref: /freebsd/usr.sbin/kldxref/fileformat (revision 5c52a79884070364bfc920fb8e492cfac61ec72f)
1$FreeBSD$
2
3    linker.hints file consists from the one or more records. First record of
4file is special and determines its version:
5
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 {
19	int	type;		/* type of data. currently MTD_* values */
20};
21
22    The rest of record depends on the type.
23
24struct string {
25	int	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;
32	int	version;
33	struct string	kldname;
34};
35
36struct data_mdt_module {
37	int	type = MDT_VERSION;
38	struct string	modname;
39	struct string	kldname;
40};
41