Skip to content

Commit

Permalink
Remove @PLT from "call _dl_init@PLT" in _dl_start_user
Browse files Browse the repository at this point in the history
_dl_start_user in ld.so calls the local function _dl_init.  There is no
need to go through PLT.

	* 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".
  • Loading branch information
H.J. Lu committed Dec 21, 2014
1 parent 98fe149 commit 7432d61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2014-12-21 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-21 Anders Kaseorg <andersk@mit.edu>

* manual/search.texi: (Array Sort Function): Clarify stable sorting
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/i386/dl-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/x86_64/dl-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down

0 comments on commit 7432d61

Please sign in to comment.