Page 1 of 1

nasm error

Posted: Wed Feb 04, 2004 1:08 am
by shaz
i'm getting error "coff format does not support non-32-bit relocations".
please tell me whats causing error and how to remove it.
here is my command

Code: Select all

nasm -f coff kernel.asm

code is as follows

Code: Select all

[bits 32] 
SECTION .text
.
.
.
.
.
unhand:
??????mov byte[gs:0xB80A0],'S'
  jmp $
.
.
idt:
1) dw unhand
    dw CODESEL
    db 0
    db 0x8E
    dw 0
idt_end:
i'm getting error at line marked 1)

Re:nasm error

Posted: Wed Feb 04, 2004 1:57 am
by df
youve given it a 32bit address. the only way that will work is if its linked inside 64kb. coff sees all addresses like that as 32bit.

nasm might like it if you did

dw (unhand & 0xFFFF) or something... or write a routine to build your IDT at runtime... its way more efficient..