The 64-bit MIPS ABIs involve the caller setting up t9 ($25) to the
address of the called function, and the called function then using
this in a .cpsetup directive to compute gp. The .cpsetup directive
needs to name the function to which t9 points for this purpose. In
the definition of *_nocancel functions, the directive pointed to the
normal entry point rather than the _nocancel one, resulting in
segfaults when the _nocancel functions were used. This patch corrects
the function name used in the directive. (It seems the bug was latent
until Roland's not-cancel.h unification, with the _nocancel entry
points not previously being used - so not user-visible in a release,
so no Bugzilla entry required.)
Tested mips64 sufficiently to confirm the previously seen segfaults
are fixed.
* sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
[__PIC__] (PSEUDO): Use name of _nocancel entry point in
corresponding .cpsetup call.
+2014-06-26 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
+ [__PIC__] (PSEUDO): Use name of _nocancel entry point in
+ corresponding .cpsetup call.
+
2014-06-26 Roland McGrath <roland@hack.frob.com>
* sysdeps/unix/sysv/linux/arm/libc-aeabi_read_tp.S: Moved ...
.globl __##syscall_name##_nocancel; \
__##syscall_name##_nocancel: \
SAVESTK; \
- .cpsetup t9, STKOFF_GP, name; \
+ .cpsetup t9, STKOFF_GP, __##syscall_name##_nocancel; \
cfi_rel_offset (gp, STKOFF_GP); \
li v0, SYS_ify(syscall_name); \
syscall; \