Mail Archives: djgpp/2000/05/31/00:46:52
Hello.
Eli Zaretskii wrote:
>
> Richard Dawe wrote:
> > My first problem is this: binutils 2.8.1 & cross-binutils 2.9.1.0.4
> > were happy with the 'lcall _entrypoint' syntax. binutils 2.9.5.1 beta
> > is OK, but warns that without a '*' the address is a relative address.
>
> Yes, this is one of the incompatible changes in the latest versions of
> Binutils.
I took a look at this problem at the weekend and I couldn't find a way to
avoid this syntax. I tried loading the selector into es and then
referencing the offset's memory location, like so:
lcall %%es:_myoffset
but this always resulted in a segmentation fault. The only way I could get
lcall to work was with the original syntax:
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.
My guess is that lcall gets the offset and selector out of memory
regardless of the segment you place in front of it, when you specify a
memory location. I guess I will find the real answer, if I look at the
sources for the lcall support in as for both binutils versions. Ah well.
Thanks the help anyway. Bye,
--
Richard Dawe
richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/
- Raw text -