GAS Syntax & TSS
Posted: Fri Mar 21, 2008 1:32 pm
I want to init a tss using GAS assembly.
This is my code:
But there are some errors:
boot/start.S: Assembler messages:
boot/start.S:286: Error: invalid sections for operation on `arch_tss' and `L0'
boot/start.S:287: Error: invalid sections for operation on `arch_tss' and `L0'
boot/start.S:290: Error: invalid sections for operation on `arch_tss' and `L0'
I noticed that errors are in lines where I use only arch_tss without tss_end - arch_tss - 1, but I need to use only arch_tss!
How can I resolve these errors?
This is my code:
Code: Select all
arch_tss:
.fill 104
tss_end:
; // Kernel TSS descriptor 0x28
.word ((tss_end - arch_tss - 1) & 0xFFFF) ; // Limit 15:0
.word (arch_tss & 0xFFFF) ; // Base 15:0
.byte ((arch_tss >> 16) & 0xFF) ; // Base 23:16
.byte 0x89
.byte ( ((tss_end - arch_tss - 1) >> 16) & 0xF ) ; // Limit
.byte ((arch_tss >> 24) & 0xFF) ; // Base 31:24
boot/start.S: Assembler messages:
boot/start.S:286: Error: invalid sections for operation on `arch_tss' and `L0'
boot/start.S:287: Error: invalid sections for operation on `arch_tss' and `L0'
boot/start.S:290: Error: invalid sections for operation on `arch_tss' and `L0'
I noticed that errors are in lines where I use only arch_tss without tss_end - arch_tss - 1, but I need to use only arch_tss!
How can I resolve these errors?