summaryrefslogtreecommitdiff
path: root/na/include
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-04-29 02:45:08 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-04-29 02:45:08 +0800
commit66aa461f98d0abad8e6fcd4bb8b31170d8d80804 (patch)
tree4b913ea5b2c7bbb27a9b9401e207b49ee80f6ea0 /na/include
parent12cbc1c0cac64f99b3784554eb540b20f33e9f23 (diff)
downloadlume-66aa461f98d0abad8e6fcd4bb8b31170d8d80804.tar.gz
lume-66aa461f98d0abad8e6fcd4bb8b31170d8d80804.tar.xz
feat: add driver registration table to linker script macros
Diffstat (limited to 'na/include')
-rw-r--r--na/include/lume/lumeos.lds.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/na/include/lume/lumeos.lds.h b/na/include/lume/lumeos.lds.h
index b4a8f42..76e1e75 100644
--- a/na/include/lume/lumeos.lds.h
+++ b/na/include/lume/lumeos.lds.h
@@ -29,6 +29,7 @@
_srodata = .; \
*(.rodata .rodata.*) \
INIT_ARRAY \
+ DRIVER_ARRAY \
_erodata = .; \
}
@@ -39,6 +40,13 @@
KEEP(*(.init_array .init_array.*)) \
__init_array_end = .;
+/* ===== Driver Registration Table ===== */
+#define DRIVER_ARRAY \
+ . = ALIGN(8); \
+ PROVIDE(__drivers_start = .); \
+ KEEP(*(.drivers)) \
+ PROVIDE(__drivers_end = .);
+
/* ===== Initialized Read-Write Data ===== */
#define DATA_SECTION \
.data : AT(ADDR(.data) - PAGE_OFFSET) { \