nasm error

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
shaz

nasm error

Post 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)
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:nasm error

Post 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..
-- Stu --
Post Reply