Xyris  0.5
sections.hpp
Go to the documentation of this file.
1 /**
2  * @file sections.hpp
3  * @author Keeton Feavel ([email protected])
4  * @brief Kernel ELF section definitions
5  * @version 0.1
6  * @date 2021-06-27
7  *
8  * @copyright Copyright the Xyris Contributors (c) 2021
9  *
10  */
11 #pragma once
12 
13 #include <stddef.h>
14 
15 // Kernel ELF Sections
16 // Externs (address values) are prefixed with an underscore
17 // Pointers to sections have the underscore removed
18 extern size_t _EARLY_MEM_START;
19 #define EARLY_MEM_START ((uintptr_t)&_EARLY_MEM_START)
20 
21 extern size_t _EARLY_KERNEL_START;
22 #define EARLY_KERNEL_START ((uintptr_t)&_EARLY_KERNEL_START)
23 extern size_t _EARLY_KERNEL_END;
24 #define EARLY_KERNEL_END ((uintptr_t)&_EARLY_KERNEL_END)
25 
26 extern size_t _KERNEL_BASE;
27 #define KERNEL_BASE ((uintptr_t)&_KERNEL_BASE)
28 
29 extern size_t _KERNEL_START;
30 #define KERNEL_START ((uintptr_t)&_KERNEL_START)
31 extern size_t _KERNEL_END;
32 #define KERNEL_END ((uintptr_t)&_KERNEL_END)
33 
34 extern size_t _EARLY_BSS_SIZE;
35 extern size_t _EARLY_BSS_START;
36 #define EARLY_BSS_START ((uintptr_t)&_EARLY_BSS_START)
37 extern size_t _EARLY_BSS_END;
38 #define EARLY_BSS_END ((uintptr_t)&_EARLY_BSS_END)
39 
40 extern size_t _CTORS_START;
41 #define CTORS_START ((uintptr_t)&_CTORS_START)
42 extern size_t _CTORS_END;
43 #define CTORS_END ((uintptr_t)&_CTORS_END)
44 
45 extern size_t _BSS_SIZE;
46 extern size_t _BSS_START;
47 #define BSS_START ((uintptr_t)&_BSS_START)
48 extern size_t _BSS_END;
49 #define BSS_END ((uintptr_t)&_BSS_END)
50 
51 extern size_t _PAGE_TABLES_START;
52 #define PAGE_TABLES_START ((uintptr_t)&_PAGE_TABLES_START)
53 extern size_t _PAGE_TABLES_END;
54 #define PAGE_TABLES_END ((uintptr_t)&_PAGE_TABLES_END)
_EARLY_KERNEL_START
size_t _EARLY_KERNEL_START
_PAGE_TABLES_END
size_t _PAGE_TABLES_END
_KERNEL_END
size_t _KERNEL_END
_KERNEL_START
size_t _KERNEL_START
_PAGE_TABLES_START
size_t _PAGE_TABLES_START
_EARLY_BSS_END
size_t _EARLY_BSS_END
_BSS_END
size_t _BSS_END
_EARLY_BSS_START
size_t _EARLY_BSS_START
_EARLY_MEM_START
size_t _EARLY_MEM_START
_BSS_START
size_t _BSS_START
_EARLY_BSS_SIZE
size_t _EARLY_BSS_SIZE
_CTORS_END
size_t _CTORS_END
_BSS_SIZE
size_t _BSS_SIZE
_EARLY_KERNEL_END
size_t _EARLY_KERNEL_END
_KERNEL_BASE
size_t _KERNEL_BASE
_CTORS_START
size_t _CTORS_START