Am 16.11.2010 um 00:43 schrieb Alexander Graf:
On 16.11.2010, at 00:39, Andreas Färber wrote:
Dereference function descriptors.
Just putting this out there. In addition to function descriptor deref (still in need of macros like LOAD_REG_ADDR_IMMEDIATE and LOAD_REG_ADDR) I checked whether it makes any difference whether we simulate the original ba by a bctr - not noticably. Also FYI my unsuccessful ldscript attempts.
arch/ppc/qemu/start.S | 30 ++++++++++++++++++++++++++++++ arch/ppc64/qemu/ldscript | 43 ++++++++++++++++++++++++++++++++++++ +++++-- 2 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S index 6cf20cf..1a63082 100644 --- a/arch/ppc/qemu/start.S +++ b/arch/ppc/qemu/start.S @@ -274,15 +274,33 @@ GLOBL(__vectors):
call_dsi_exception: LOAD_REG_IMMEDIATE(r3, dsi_exception) +#ifdef __powerpc64__
- ld r3, 0(r3)
+#endif
Have you checked if .dsi_exception is available? Usually the dotted one is the version without indirection.
Not yet, but that wouldn't spare us the special-handling for ppc64 either, since ppc wouldn't know the dotted version, right? Should we #define it then? Linux uses LOAD_ADDR_REG() macro, going via GOT, which wouldn't work ATM.
Andreas