This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] i386: Update _dl_runtime_resolve/_dl_runtime_profile
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 17 Jun 2017 15:35:50 +0200
- Subject: Re: [PATCH 2/2] i386: Update _dl_runtime_resolve/_dl_runtime_profile
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AA5BD59
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AA5BD59
- References: <20170617130710.GB14641@gmail.com>
On 06/17/2017 03:07 PM, H.J. Lu wrote:
> - popl %edx # Get register content back.
> - cfi_adjust_cfa_offset (-4)
> - movl (%esp), %ecx
> - movl %eax, (%esp) # Store the function address.
> - movl 4(%esp), %eax
> - ret $12 # Jump to function address.
> + movl (%esp), %edx # Get register content back.
> + movl %eax, %ecx # Store the function address.
> + movl 4(%esp), %eax # Get register content back.
> + addl $16, %esp # Adjust stack(PLT did 2 pushes)
> + cfi_adjust_cfa_offset (-16)
> + jmp *%ecx # Jump to function address.
Did the old code break the return stack optimization? I suppose this is
a real improvement, then. (I'm aware it depends on reserving the %ecx
register.)
Thanks,
Florian