delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/19/15:30:52

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <394E733C.FE5BAB89@phekda.freeserve.co.uk>
Date: Mon, 19 Jun 2000 20:23:40 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.14 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: rich AT phekda DOT freeserve DOT co DOT uk, djgpp AT delorie DOT com
Subject: Re: Inline asm: lcall & various binutils versions
References: <39060495 DOT 8CA597B0 AT bigfoot DOT com> <39069F55 DOT 639FE192 AT is DOT elta DOT co DOT il> <39341DE2 DOT 20CA1843 AT bigfoot DOT com> <200005302109 DOT AAA27505 AT alpha DOT netvision DOT net DOT il>
Reply-To: djgpp AT delorie DOT com

Hello.

Eli Zaretskii wrote:
> 
> Richard Dawe wrote:
[snip]
> > lcall _entrypoint
> >
> > where entrypoint is an array of two shorts, index 0 being the offset
> > and 1 the selector. In spite of binutils 2.9.5.1 beta generating a
> > warning, it generates the right code, looking at the disassembly.
> > Relying on this behaviour is probably wrong, but it seems to work. I
> > have no idea how to make it backward compatible with 2.8.1/forward
> > compatible with 2.9.5.1 beta, so it seems I will just have to live
> > with this.

A refresher: my original problem was this: binutils 2.9.5.1 beta generates
an error when using 'lcall _entrypoint', since it should be 'lcall
*_entrypoint' to jump to the absolute address stored in '_entrypoint'.
Unforunately, binutils 2.8.1 barfs on the version with the asterisk (*).

> Perhaps a question posted to binutils AT sourceware DOT cygnus DOT com will bring
> an answer.

Well, before posting a question, I thought I'd search the mail archives.
The following mails answer my question:

http://sourceware.cygnus.com/ml/binutils/2000-05/msg00660.html
http://sourceware.cygnus.com/ml/binutils/2000-05/msg00661.html
http://sourceware.cygnus.com/ml/binutils/2000-05/msg00662.html

The answer seems to be that there is no easy way. The solutions seem to
be:

1. Leave off the asterisk. This generates a warning and the correct code.
The correct code is generated right now - possibly it won't be in the
future.

2. Force everyone to upgrade to binutils 2.9.5.1 beta. IMHO not realistic.

3. Detect which version of binutils is being used and adjust the code
appropriately. Perhaps the most likely, but ugly in terms of code. :(

Bye,

-- 
Richard Dawe
[ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]

- Raw text -


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