Remove @PLT from "call _dl_init@PLT" in x86 _dl_start_user
Commit Message
_dl_start_user in ld.so calls the local function _dl_init. There is no
need to go through PLT. Tested on x86, x32 and x86-64. OK to install?
Thanks.
H.J.
---
* sysdeps/i386/dl-machine.h (_dl_start_user): Remove @PLT
from "call _dl_init@PLT".
* sysdeps/x86_64/dl-machine.h (_dl_start_user): Likewise.
from "call _dl_init@PLT".
---
ChangeLog | 7 +++++++
sysdeps/i386/dl-machine.h | 2 +-
sysdeps/x86_64/dl-machine.h | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
Comments
On Sat, Dec 20, 2014 at 12:28:54PM -0800, H.J. Lu wrote:
> _dl_start_user in ld.so calls the local function _dl_init. There is no
> need to go through PLT. Tested on x86, x32 and x86-64. OK to install?
>
looks ok.
@@ -1,3 +1,10 @@
+2014-12-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/i386/dl-machine.h (_dl_start_user): Remove @PLT
+ from "call _dl_init@PLT".
+ * sysdeps/x86_64/dl-machine.h (_dl_start_user): Likewise.
+ from "call _dl_init@PLT".
+
2014-12-20 Chris Metcalf <cmetcalf@ezchip.com>
* sysdeps/unix/sysv/linux/tile/localplt.data: New file.
@@ -221,7 +221,7 @@ _dl_start_user:\n\
# Clear %ebp, so that even constructors have terminated backchain.\n\
xorl %ebp, %ebp\n\
# Call the function to run the initializers.\n\
- call _dl_init@PLT\n\
+ call _dl_init\n\
# Pass our finalizer function to the user in %edx, as per ELF ABI.\n\
leal _dl_fini@GOTOFF(%ebx), %edx\n\
# Restore %esp _start expects.\n\
@@ -156,7 +156,7 @@ _dl_start_user:\n\
# Clear %rbp to mark outermost frame obviously even for constructors.\n\
xorl %ebp, %ebp\n\
# Call the function to run the initializers.\n\
- call _dl_init@PLT\n\
+ call _dl_init\n\
# Pass our finalizer function to the user in %rdx, as per ELF ABI.\n\
leaq _dl_fini(%rip), %rdx\n\
# And make sure %rsp points to argc stored on the stack.\n\