diff --git a/x86/kernel.ld b/x86/kernel.ld index 8a428d22aa643feca2710a098dce96e202b32800..3f524a8bd14a61d19cfa597d1fced753a4e85297 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*) }