diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-04-29 05:35:34 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-04-29 05:35:34 -0700 |
commit | 2ad5d0845d80589d0adf86593bd36a7c71a521f8 (patch) | |
tree | 81bc0b7de7e0b93604944ed70e4125866547eb39 /string/test-strrchr.c | |
parent | 9207e30d3f070712df6c4175547094be112454d2 (diff) | |
download | glibc-2ad5d0845d80589d0adf86593bd36a7c71a521f8.tar.gz glibc-2ad5d0845d80589d0adf86593bd36a7c71a521f8.tar.xz glibc-2ad5d0845d80589d0adf86593bd36a7c71a521f8.zip |
Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810]
X32 has 32-bit long and pointer with 64-bit off_t. Since x32 psABI requires that pointers passed in registers must be zero-extended to 64bit, x32 can share many syscall interfaces with LP64. When a LP64 syscall with long and unsigned long int arguments is used for x32, these arguments must be properly extended to 64-bit. Otherwise if the upper 32 bits of the register have undefined value, such a syscall will be rejected by kernel. For syscalls implemented in assembly codes, 'U' is added to syscall signature key letters for unsigned long, which is zero-extended to 64-bit types. SYSCALL_ULONG_ARG_1 and SYSCALL_ULONG_ARG_2 are passed to syscall-template.S for the first and the second unsigned long int arguments if PSEUDOS_HAVE_ULONG_INDICES is defined. They are used by x32 to zero-extend 32-bit arguments to 64 bits. Tested on i386, x86-64 and x32 as well as with build-many-glibcs.py.
Diffstat (limited to 'string/test-strrchr.c')
0 files changed, 0 insertions, 0 deletions