aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/sysdep.h
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2020-07-10 19:41:06 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2020-07-10 19:41:06 -0300
commit7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c (patch)
treeefc90e1b49ce51b1ec962f034ca6ba872ad3c6c7 /sysdeps/powerpc/powerpc64/sysdep.h
parent936c9666aed6747f7a76221118f7cf59100075e6 (diff)
downloadglibc-7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c.zip
glibc-7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c.tar.gz
glibc-7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c.tar.bz2
powerpc64: Fix calls when r2 is not used [BZ #26173]
Teach the linker that __mcount_internal, __sigjmp_save_symbol, __syscall_error and __GI_exit do not use r2, so that it does not need to recover r2 after the call. Test at configure time if the assembler supports @notoc and define USE_PPC64_NOTOC.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/sysdep.h')
-rw-r--r--sysdeps/powerpc/powerpc64/sysdep.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
index d6616ac..d557098 100644
--- a/sysdeps/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/powerpc/powerpc64/sysdep.h
@@ -278,7 +278,7 @@ LT_LABELSUFFIX(name,_name_end): ; \
#ifdef SHARED
#define TAIL_CALL_SYSCALL_ERROR \
- b JUMPTARGET(__syscall_error)
+ b JUMPTARGET (NOTOC (__syscall_error))
#else
/* Static version might be linked into a large app with a toc exceeding
64k. We can't put a toc adjusting stub on a plain branch, so can't
@@ -366,6 +366,12 @@ LT_LABELSUFFIX(name,_name_end): ; \
lwz rOUT,0(rOUT)
#endif
+#ifdef USE_PPC64_NOTOC
+# define NOTOC(l) l@notoc
+#else
+# define NOTOC(l) l
+#endif
+
#else /* !__ASSEMBLER__ */
#if _CALL_ELF != 2