aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/configure.ac
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/configure.ac
parent936c9666aed6747f7a76221118f7cf59100075e6 (diff)
downloadglibc-7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c.tar
glibc-7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c.tar.gz
glibc-7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c.tar.bz2
glibc-7c7bcf3634e44cf7e001aaa302138c1ee0e58f8c.zip
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/configure.ac')
-rw-r--r--sysdeps/powerpc/powerpc64/configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/configure.ac b/sysdeps/powerpc/powerpc64/configure.ac
index f309ba35a8..b77156f696 100644
--- a/sysdeps/powerpc/powerpc64/configure.ac
+++ b/sysdeps/powerpc/powerpc64/configure.ac
@@ -21,3 +21,14 @@ rm -f conftest.c conftest.s
if test x$libc_cv_overlapping_opd = xyes; then
AC_DEFINE(USE_PPC64_OVERLAPPING_OPD)
fi
+
+# @notoc started to be supported in GNU Binutils 2.31.
+AC_CACHE_CHECK([if the assembler supports @notoc],
+ libc_cv_ppc64_notoc, [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+void foo (void) {asm("b foo@notoc");}
+ ])],
+ [libc_cv_ppc64_notoc=yes],
+ [libc_cv_ppc64_notoc=no])])
+AS_IF([test x$libc_cv_ppc64_notoc = xyes],
+ [AC_DEFINE(USE_PPC64_NOTOC)])