Skip to content

Commit

Permalink
Replace PREINIT_FUNCTION@PLT with *%rax in call
Browse files Browse the repository at this point in the history
Since we have loaded address of PREINIT_FUNCTION into %rax, we can
avoid extra branch to PLT slot.

	[BZ #19745]
	* sysdeps/x86_64/crti.S (_init): Replace PREINIT_FUNCTION@PLT
	with *%rax in call.
  • Loading branch information
H.J. Lu committed Mar 5, 2016
1 parent 21683b5 commit 16b23e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2016-03-04 H.J. Lu <hongjiu.lu@intel.com>

[BZ #19745]
* sysdeps/x86_64/crti.S (_init): Replace PREINIT_FUNCTION@PLT
with *%rax in call.

2016-03-04 H.J. Lu <hongjiu.lu@intel.com>

[BZ #19745]
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/x86_64/crti.S
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ _init:
movq PREINIT_FUNCTION@GOTPCREL(%rip), %rax
testq %rax, %rax
je .Lno_weak_fn
call PREINIT_FUNCTION@PLT
call *%rax
.Lno_weak_fn:
#else
call PREINIT_FUNCTION
Expand Down

0 comments on commit 16b23e0

Please sign in to comment.