delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/09/10:45:18

X-Apparently-To: clax86 AT yahoo DOT com via web9602; 08 Jun 2001 23:20:27 -0700 (PDT)
From: rendeg AT my-dejanews DOT com (Rennie deGraaf)
Newsgroups: comp.lang.asm.x86,comp.os.msdos.djgpp
Subject: error linking asm module
Organization: http://groups.google.com/
Approved: <johnfine AT earthlink DOT net>
Lines: 72
Message-ID: <kIpU6.5025$p%4.520503@newsread2.prod.itd.earthlink.net>
Date: Sat, 09 Jun 2001 13:41:36 GMT
NNTP-Posting-Host: 168.191.58.125
X-Complaints-To: abuse AT earthlink DOT net
X-Trace: newsread2.prod.itd.earthlink.net 992094096 168.191.58.125 (Sat, 09 Jun 2001 06:41:36 PDT)
NNTP-Posting-Date: Sat, 09 Jun 2001 06:41:36 PDT
X-Received-Date: Sat, 09 Jun 2001 06:39:35 PDT (newsmaster1.prod.itd.earthlink.net)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019