From 055535000742d1678d721104b88eb35fda3eb44c Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Fri, 19 Aug 2016 17:38:37 -0600 Subject: [PATCH] WIP: Thread control block and TSS in kernel --- x86/kernel.ld | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/x86/kernel.ld b/x86/kernel.ld index 8a428d2..3f524a8 100644 --- a/x86/kernel.ld +++ b/x86/kernel.ld @@ -28,26 +28,42 @@ SECTIONS { *(.data*) . = ALIGN(4096); __data_end = .; + } + + .tdata : AT(ADDR(.tdata) - KERNEL_OFFSET) { __tdata_start = .; *(.tdata*) - . = ALIGN(4096); + . = ALIGN(4096); __tdata_end = .; } + .tbss : AT(ADDR(.tbss) - KERNEL_OFFSET) { + __tbss_start = .; + *(.tbss*) + . = ALIGN(4096); + __tbss_end = .; + } + + .tcb : AT(ADDR(.tcb) - KERNEL_OFFSET) { + __tcb = .; + . += 8; + . = ALIGN(4096); + } + .bss : AT(ADDR(.bss) - KERNEL_OFFSET) { __bss_start = .; *(.bss*) . = ALIGN(4096); __bss_end = .; - __tbss_start = .; - *(.tbss*) - . = ALIGN(4096); - __tbss_end = .; } + __end = .; + /DISCARD/ : { *(.comment*) + *(.debug*) *(.eh_frame*) + *(.gcc_except_table*) *(.note*) *(.rel.eh_frame*) } -- GitLab