Hi,
ich habe ein Problem mit dem elf-Format.
Hier mein Code.
Das assembliere ich mit "nasm -f elf -o test.elf test.asm".
Soweit kein Problem.
Ich muss die Datei aber linken.
Also "ld.exe -T link.ld -o test.bin test.elf".
Jetzt bekomme ich folgende Fehlermeldung: "(.text+0x2): relocation truncated to fit: R_386_16 against `.text'".
Das Problem ist wohl das mov si, msg.
Was ist der Unterschied zwischen elf und z.B. bin?
Danke im Voraus.
ich habe ein Problem mit dem elf-Format.
Hier mein Code.
Code:
start:
mov si, msg
call schreiben
call lesen
mov ah, 0x04C
int 0x21
schreiben:
lodsb
or al, al
jz _ret
mov bx, 0x07
mov ah, 0x0E
int 0x10
jmp schreiben
lesen:
mov ah, 0x0
int 0x16
ret
_ret:
retn
msg db "Teststring", 13, 10, 0
Das assembliere ich mit "nasm -f elf -o test.elf test.asm".
Soweit kein Problem.
Ich muss die Datei aber linken.
Also "ld.exe -T link.ld -o test.bin test.elf".
Jetzt bekomme ich folgende Fehlermeldung: "(.text+0x2): relocation truncated to fit: R_386_16 against `.text'".
Das Problem ist wohl das mov si, msg.
Was ist der Unterschied zwischen elf und z.B. bin?
Danke im Voraus.