This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: assertion failure in coff-i386.c on .code16
- To: alan AT SPRI.Levels.UniSA.Edu.Au
- Subject: Re: assertion failure in coff-i386.c on .code16
- From: Ian Lance Taylor <ian AT zembu dot com>
- Date: 17 Sep 1999 10:02:30 -0400
- CC: pavel_roskin AT geocities dot com, binutils AT sourceware.cygnus dot com
- References: <Pine.LNX.4.10.9909171902500.3382-100000@mullet.itr.unisa.edu.au>
Date: Fri, 17 Sep 1999 19:56:42 +0930 (CST)
From: Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
On Fri, 17 Sep 1999, Pavel Roskin wrote:
> While configuring GNU GRUB I have noticed that "as" cannot compile the
> following file:
>
> .code16
> l1: addr32
> movb %al, l1
>
> D:\home\proski\src\bfd>as test.s
> test.s: Assembler messages:
> test.s:2: Warning: stand-alone `addr32' prefix
> as: bfd assertion fail coff-i386.c:498
> test.s:3: Error: Cannot represent relocation type BFD_RELOC_16
.code16 on ix86 works properly only for elf at the moment. It looks
fairly easy to fix for coff though, but I'm not sure whether we need to
add R_DIR16 support, and use that for the BFD_RELOC_16 case, or whether we
should use R_RELWORD. To round out support, I suppose we need
to add R_DIR8 (type 0??) or use R_RELBYTE. I'm no coff expert. Ian?
I think using R_RELWORD and R_RELBYTE should work fine. I have no
idea why the i386 COFF backend supports both R_DIR32 and R_RELLONG.
Ian