summaryrefslogtreecommitdiffstats
path: root/usr.sbin/kldxref/fileformat
blob: 2eddcca4a14d93641883896d2cd55a84d047163c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$FreeBSD$

    linker.hints file consists from the one or more records. 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 MTD_* values */
};

    The rest of record depends on the type.

struct string {
	int	length;		/* length of string */
	char	val[];		/* string itself (no terminating zero) */
};

struct data_mdt_version {
	int	type = MDT_VERSION;
	struct string	modname;
	int	version;
	struct string	kldname;
};

struct data_mdt_module {
	int	type = MDT_VERSION;
	struct string	modname;
	struct string	kldname;
};
OpenPOWER on IntegriCloud