]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Call x86-64 __mcount_internal/__sigjmp_save directly
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 2 Mar 2016 00:58:07 +0000 (16:58 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 2 Mar 2016 00:58:07 +0000 (16:58 -0800)
Since __mcount_internal and __sigjmp_save are internal to x86-64 libc.so:

3532: 0000000000104530   289 FUNC    LOCAL  DEFAULT   13 __mcount_internal
3391: 0000000000034170    38 FUNC    LOCAL  DEFAULT   13 __sigjmp_save

they can be called directly without PLT.

* sysdeps/x86_64/_mcount.S (C_LABEL(_mcount)): Call
__mcount_internal directly.
(C_LABEL(__fentry__)): Likewise.
* sysdeps/x86_64/setjmp.S __sigsetjmp): Call __sigjmp_save
directly.

ChangeLog
sysdeps/x86_64/_mcount.S
sysdeps/x86_64/setjmp.S

index 28086455d8ccebbeef2f81cb1d9013b7283dac7f..787fef118f10ef9381d9597a7d7f8fbff4704add 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-03-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * sysdeps/x86_64/_mcount.S (C_LABEL(_mcount)): Call
+       __mcount_internal directly.
+       (C_LABEL(__fentry__)): Likewise.
+       * sysdeps/x86_64/setjmp.S __sigsetjmp): Call __sigjmp_save
+       directly.
+
 2016-03-01  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/unix/sysv/linux/x86_64/__start_context.S
index 5d7edd2a29e06956e878bf0b688ed4c557ebffc5..ba13643464c63f16b17650839c35dbe4e67d9e2c 100644 (file)
@@ -43,11 +43,7 @@ C_LABEL(_mcount)
        movq    56(%rsp),%rsi
        /* Get frompc via the frame pointer.  */
        movq    8(%rbp),%rdi
-#ifdef PIC
-       call C_SYMBOL_NAME(__mcount_internal)@PLT
-#else
        call C_SYMBOL_NAME(__mcount_internal)
-#endif
        /* Pop the saved registers.  Please note that `mcount' has no
           return value.  */
        movq    48(%rsp),%r9
@@ -84,11 +80,7 @@ C_LABEL(__fentry__)
        movq    64(%rsp),%rsi
        /* caller is the return address above it */
        movq    72(%rsp),%rdi
-#ifdef PIC
-       call C_SYMBOL_NAME(__mcount_internal)@PLT
-#else
        call C_SYMBOL_NAME(__mcount_internal)
-#endif
        /* Pop the saved registers.  Please note that `__fentry__' has no
           return value.  */
        movq    48(%rsp),%r9
index 3e93967c2fdce0a9306a006e828a581645bae51e..e37c22378bb62617171669b5ba9d6b87732d3653 100644 (file)
@@ -60,11 +60,7 @@ ENTRY (__sigsetjmp)
        retq
 #else
        /* Make a tail call to __sigjmp_save; it takes the same args.  */
-# ifdef        PIC
-       jmp C_SYMBOL_NAME (__sigjmp_save)@PLT
-# else
        jmp __sigjmp_save
-# endif
 #endif
 END (__sigsetjmp)
 hidden_def (__sigsetjmp)