• R
    in mips cancellable syscall asm, don't assume gp register is valid · 756c8af8
    Rich Felker 提交于
    the old __cp_cancel code path loaded the address of __cancel from the
    GOT using the $gp register, which happened to be set to point to the
    correct GOT by the calling C function, but there is no ABI requirement
    that this happen. instead, go the roundabout way and compute the
    address of __cancel via pc-relative and gp-relative addressing
    starting with a fake return address generated by a bal instruction,
    which is the same trick crt1 uses to bootstrap.
    756c8af8
syscall_cp.s 1.1 KB