Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: more on proff crash building native



> [T]he real problem has to do with the code in libm.so
> (__libm_dsqrt_r5) doing a rsb with the stack wrong.  Basically the 2
> double args (4 words) are still on the stack.

That's odd; looking at the code, it appears to be passing the args in
registers when it jumps to __libm_dsqrt_r5, and I don't see anything
using the stack there.  I suspect you're right that it's something in
the dynamic linker breaking things - perhaps __libm_dsqrt_r5 is going
through a dynamic linker stub that doesn't realize it's not being
called with a calls/callg sequence.  I should see if I can't set
something up so I can have a look at the code myself, because VAX
assembly-level code is something I do know.  (I went through my larval
phase on the VAX.)

One thing you might try: set a breakpoint at the _hypot entry and
single-step through; when it does the jmp to __libm_dsrqt_r5+2, see if
it lands directly at the code in n_sqrt.S or whether it's hitting the
dynamic linker first.  If the latter, that's a strong indication that
it's just ("just", heh) the dynamic linker not realizing that it's
dealing with a nonstandard calling convention.

Perhaps n_cabs.S and n_sqrt.S need to be merged into a single file, so
the reference to __libm_dsqrt_r5 isn't an inter-file reference and thus
doesn't get the dynamic linker inflicted on it?

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index