]> sourceware.org Git - glibc.git/commitdiff
powerpc64: Fix syscall_cancel build for powerpc64le-linux-gnu [BZ #32125]
authorJeevitha Palanisamy <jeevitha@linux.ibm.com>
Fri, 30 Aug 2024 13:15:16 +0000 (08:15 -0500)
committerPeter Bergner <bergner@linux.ibm.com>
Fri, 30 Aug 2024 13:50:47 +0000 (08:50 -0500)
In __syscall_cancel_arch, there's a tail call to __syscall_do_cancel.
On P10, since the caller uses the TOC and the callee is using
PC-relative addressing, there's only a branch instruction with no NOPs
to restore the TOC, which causes the build error. The fix involves adding
the NOTOC directive to the branch instruction, informing the linker
not to generate a TOC stub, thus resolving the issue.

sysdeps/powerpc/powerpc64/sysdep.h

index 643aadaae00b471c7b9ccd2862c1109aadebd986..c439b061218b18d5d9fb2fd5c6fc069bdc52c389 100644 (file)
@@ -354,7 +354,7 @@ LT_LABELSUFFIX(name,_name_end): ; \
 
 #ifdef SHARED
 # define TAIL_CALL_NO_RETURN(__func) \
-    b JUMPTARGET(__func)
+    b JUMPTARGET (NOTOC (__func))
 #else
 # define TAIL_CALL_NO_RETURN(__func) \
     .ifdef .Local ## __func; \
This page took 0.043123 seconds and 5 git commands to generate.