[PATCH 0/6] Avoid PLT in i386 syscalls
H.J. Lu
hjl.tools@gmail.com
Thu Oct 22 12:32:00 GMT 2015
On Thu, Oct 22, 2015 at 5:09 AM, Andreas Schwab <schwab@suse.de> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> On Wed, Oct 21, 2015 at 9:00 AM, Andreas Schwab <schwab@suse.de> wrote:
>>> One of these patches probably broke powerpc.
>>>
>>
>> Which one?
>
> 4/6. You must use INTERNAL_SYSCALL_ERRNO to extract the errno
> value from an INTERNAL_SYSCALL.
>
There are
H.J. Lu (6):
Add INLINE_SYSCALL_ERROR_RETURN
Use INLINE_SYSCALL_ERROR_RETURN
Avoid reading errno in syscall implementations
Use INTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN
Optimize i386 syscall inlining
i386: Remove syscall assembly codes with 6 arguments
Use INTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN_VALUE
This patch uses INTERNAL_SYSCALL and INLINE_SYSCALL_ERROR_RETURN_VALUE
to avoid reading and writing errno directly so that we don't need to
call __x86.get_pc_thunk.reg to load PC into reg in case there is an
error.
* sysdeps/unix/sysv/linux/i386/brk.c (__brk): Use
INLINE_SYSCALL_ERROR_RETURN_VALUE.
* sysdeps/unix/sysv/linux/i386/fxstatat.c (__fxstatat):
Likewise.
* sysdeps/unix/sysv/linux/i386/setegid.c (setegid): Likewise.
* sysdeps/unix/sysv/linux/i386/seteuid.c (seteuid): Likewise.
* sysdeps/unix/sysv/linux/i386/fxstat.c (__fxstat): Use
INTERNAL_SYSCALLINTERNAL_SYSCALL and
INLINE_SYSCALL_ERROR_RETURN_VALUE.
* sysdeps/unix/sysv/linux/i386/lockf64.c (lockf64): Likewise.
* sysdeps/unix/sysv/linux/i386/lxstat.c (__lxstat): Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c (__libc_sigaction):
Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c (__xstat): Likewise.
How does it impact powerpc? Do you have a commit number?
--
H.J.
More information about the Libc-alpha
mailing list