[PATCH] x32: Add <asm/unistd_x32.h> and regenerate arch-syscall.h
H.J. Lu
hjl.tools@gmail.com
Mon Aug 24 13:56:29 GMT 2020
On Mon, Aug 24, 2020 at 6:23 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > It doesn't work in this case. <fixup-asm-unistd.h> is used to undefine or
> > redefine a syscall from <asm/unistd.h>. The actual syscall numbers still
> > come from <asm/unistd.h>. In this case, the sycall number is missing from
> > <asm/unistd_x32.h>. My patch is a prerequisite for a new testcase:
> >
> > ../sysdeps/unix/sysv/linux/x86/tst-sigreturn-1.c: In function ‘setup_ldt’:
> > ../sysdeps/unix/sysv/linux/x86/tst-sigreturn-1.c:258:14: error:
> > ‘SYS_set_thread_area’ undeclared (first use in this function)
> > 258 | if (syscall(SYS_set_thread_area, &gdt_data16_desc) == 0) {
> > | ^~~~~~~~~~~~~~~~~~~
>
> Can you make it an internal test and use __NR_set_thread_area?
>
Like?
#if !defined(__NR_set_thread_area) && defined(__x86_64__) && defined(__ILP32__)
/* X32 uses the same 64-bit syscall interface for set_thread_area. */
# define __NR_set_thread_area (__X32_SYSCALL_BIT + 205)
#endif
--
H.J.
More information about the Libc-alpha
mailing list