Mail Archives: djgpp/2000/06/19/15:30:52
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 -