1/* @title: Kernel symbol table */
2#pragma once
3#include <stdint.h>
4
5#define KERNEL_SYMS_MAGIC 0x534d5953u /* "SYMS" */
6
7#define KERNEL_SYMS_RESERVE 2621440
8
9struct kernel_syms_hdr {
10 uint32_t magic;
11 uint32_t count;
12 uint32_t strtab_off; /* from the start of the header */
13 uint32_t lines_off; /* 0 when the build produced no line table */
14};
15
16struct kernel_sym {
17 uint64_t addr;
18 uint32_t name_off; /* from the start of the string table */
19 uint32_t _pad;
20};
21
22#define KERNEL_LINES_MAGIC 0x454e494cu /* "LINE" */
23
24struct kernel_lines_hdr {
25 uint32_t magic;
26 uint32_t count; /* entries in the stream */
27 uint64_t base_addr; /* the address the first delta is relative to */
28 uint32_t stream_off;
29 uint32_t stream_len;
30 uint32_t files_off; /* NULL separated names, indexed by the file field */
31 uint32_t files_len;
32};
33
34extern const char kernel_syms_blob[KERNEL_SYMS_RESERVE];
35