Mail Archives: djgpp/2001/06/09/10:45:18
I have been trying to compile a program I wrote containing a keyboard
ISR written in asm with DJGPP, but ld has been giving me some strange
error messages:
A:\>gcc -o as1.exe isr.o keyb.o as1.o util.o
isr.o(.text+0x11):fake: relocation truncated to fit: 8 data
collect2: ld returned 1 exit status
isr.s, the assembly language module, seems to assemble properly with
"as -o isr.o isr.s", but the linking stage bombs on me.
I don't even know what that error means (and I can't find any docs for
ld error messages), let alone debug it. Most other posts I have found
concerning this errer went unanswered, or had bad or useless answers.
Is there anyone out there who is sufficently familiar with using asm
in DJGPP or is just plain smart enough to find me an answer?
Thanks,
Rennie
a listing of isr.s follows:
-----------------------------------------------------
.globl _newInt9
.globl _ISRsize
.globl _buffer
.data
_buffer:
.long 0, 0, 0, 0, 0, 0, 0, 0
_newkey:
.byte 0
.text
_newInt9:
pushl %ebp
movl %esp, %ebp
pushl %ecx
inb $0x64, %al
and 0x01, %eax
jz done
inb $0x60, %al
movb $_buffer, %cl
movb %al, _newkey(%ecx)
movb $0x20, %al
outb %al, $0x20
addb $1, _newkey
and $0x1f, _newkey
done:
popl %ecx
popl %ebx
iret
_end:
_ISRsize:
pushl %ebp
movl %esp, %ebp
movl $_end, %eax
subl $_newInt9, %eax
popl %ebp
ret
-----------------------------------------
NOTE: crossposted to comp.lang.asm.x86, comp.os.msdos.djgpp
- Raw text -