Eric Pouech wrote:
> Ulrich Weigand wrote:
> > I've also modified the i386 implementation a bit to make it
> > more easily portable; specifically, I've moved all references
> > to the delay_imports symbol into the C routine to avoid having
> > to implement PIC references in assembly ...  (on i386 it just
> > works --with impure text section--, but on Sparc it doesn't).
> 
> well, the previous implementation tried to stick as close as
> possible to Windows' (see
> http://msdn.microsoft.com/library/periodic/period98/hood1298.htm
> for the details)

I don't think we need to follow the original implementation
instruction-for-instruction.  Even the Pietrek article itself
says that delay load implementation can be modified ...
 
> the part I don't like in your patch is that we won't be able (one
> day) to implement the delay load hook... we need a ref to
> the ImgDelayDescr (not only the index in the I(AN)T) in the 
> __wine_delay_load

Eh?  We certainly *have* the ImgDelayDescr in my variant of
__wine_delay_load; it is computed there.  It is really not
all that much different, it's just that the reference to the
global symbol is done not in the assembly stub, but in the
C routine itself.

Windows does it this way because they don't care whether 
relocations have to be applied to the text section (they
don't even implement any sort of PIC code).  For us, however,
keeping the text section pure is really important, even
on the i386 architecture.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  [EMAIL PROTECTED]

Reply via email to