public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/syscall-refactor] Remove tls.h include from sysdep.h
@ 2020-06-29 21:43 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2020-06-29 21:43 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4ddfb1f7f367542ff78529b501ad0aa857755709

commit 4ddfb1f7f367542ff78529b501ad0aa857755709
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon May 25 17:57:52 2020 -0300

    Remove tls.h include from sysdep.h

Diff:
---
 sysdeps/i386/nptl/tls.h                         |  5 ---
 sysdeps/ia64/nptl/tcbhead.h                     | 35 +++++++++++++++++
 sysdeps/ia64/nptl/tls.h                         | 12 +-----
 sysdeps/nios2/nptl/tcbhead.h                    | 51 +++++++++++++++++++++++++
 sysdeps/nios2/nptl/tls.h                        | 28 +++-----------
 sysdeps/unix/sysv/linux/aarch64/sysdep.h        |  3 +-
 sysdeps/unix/sysv/linux/alpha/sysdep.h          |  2 -
 sysdeps/unix/sysv/linux/arm/sysdep.h            |  2 -
 sysdeps/unix/sysv/linux/csky/sysdep.h           |  3 +-
 sysdeps/unix/sysv/linux/generic/chmod.c         |  2 +-
 sysdeps/unix/sysv/linux/getrlimit.c             |  1 +
 sysdeps/unix/sysv/linux/gettimeofday.c          |  4 +-
 sysdeps/unix/sysv/linux/ia64/sysdep.h           |  3 +-
 sysdeps/unix/sysv/linux/m68k/sysdep.h           |  1 -
 sysdeps/unix/sysv/linux/mips/mips32/sysdep.h    |  2 -
 sysdeps/unix/sysv/linux/mips/mips64/sysdep.h    |  2 -
 sysdeps/unix/sysv/linux/mmap_internal.h         |  2 +
 sysdeps/unix/sysv/linux/msgget.c                |  2 +-
 sysdeps/unix/sysv/linux/nios2/sysdep.h          |  8 ++--
 sysdeps/unix/sysv/linux/powerpc/sysdep.h        |  2 +-
 sysdeps/unix/sysv/linux/semget.c                |  2 +-
 sysdeps/unix/sysv/linux/setrlimit.c             |  1 +
 sysdeps/unix/sysv/linux/sh/sysdep.h             |  4 +-
 sysdeps/unix/sysv/linux/x86_64/sysdep.h         |  2 +-
 sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c |  3 +-
 sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h     |  1 +
 26 files changed, 118 insertions(+), 65 deletions(-)

diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h
index ec03fc189c..6ac0102b01 100644
--- a/sysdeps/i386/nptl/tls.h
+++ b/sysdeps/i386/nptl/tls.h
@@ -21,13 +21,8 @@
 
 #include <dl-sysdep.h>
 #ifndef __ASSEMBLER__
-# include <stdbool.h>
 # include <stddef.h>
 # include <stdint.h>
-# include <stdlib.h>
-# include <sysdep.h>
-# include <libc-pointer-arith.h> /* For cast_to_integer. */
-# include <kernel-features.h>
 # include <dl-dtv.h>
 
 typedef struct
diff --git a/sysdeps/ia64/nptl/tcbhead.h b/sysdeps/ia64/nptl/tcbhead.h
new file mode 100644
index 0000000000..c9afaa4247
--- /dev/null
+++ b/sysdeps/ia64/nptl/tcbhead.h
@@ -0,0 +1,35 @@
+/* Definition for thread control block handling.  IA-64 version.
+   Copyright (C) 2003-2020 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _TCBHEAD_H
+#define _TCBHEAD_H
+
+#include <stddef.h>
+#include <dl-dtv.h>
+
+typedef struct
+{
+  dtv_t *dtv;
+  void *__private;
+} tcbhead_t;
+
+register struct pthread *__thread_self __asm__("r13");
+
+# define TLS_MULTIPLE_THREADS_IN_TCB 1
+
+#endif
diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h
index f5b1684ef3..4d6998ad3e 100644
--- a/sysdeps/ia64/nptl/tls.h
+++ b/sysdeps/ia64/nptl/tls.h
@@ -26,17 +26,7 @@
 # include <stdint.h>
 # include <stdlib.h>
 # include <list.h>
-# include <dl-dtv.h>
-
-typedef struct
-{
-  dtv_t *dtv;
-  void *__private;
-} tcbhead_t;
-
-register struct pthread *__thread_self __asm__("r13");
-
-# define TLS_MULTIPLE_THREADS_IN_TCB 1
+# include <tcbhead.h>
 
 #else /* __ASSEMBLER__ */
 # include <tcb-offsets.h>
diff --git a/sysdeps/nios2/nptl/tcbhead.h b/sysdeps/nios2/nptl/tcbhead.h
new file mode 100644
index 0000000000..28b54d30de
--- /dev/null
+++ b/sysdeps/nios2/nptl/tcbhead.h
@@ -0,0 +1,51 @@
+/* Definition for thread control block.  Nios II version.
+   Copyright (C) 2020 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#ifndef _TCBHEAD_H
+#define _TCBHEAD_H 1
+
+#include <stdint.h>
+#include <stddef.h>
+#include <dl-dtv.h>
+
+typedef struct
+{
+  dtv_t *dtv;
+  uintptr_t pointer_guard;
+  unsigned spare[6];
+} tcbhead_t;
+
+register struct pthread *__thread_self __asm__("r23");
+
+/* The thread pointer (in hardware register r23) points to the end of
+   the TCB + 0x7000, as for PowerPC and MIPS.  */
+#define TLS_TCB_OFFSET 0x7000
+
+static inline uintptr_t get_pointer_guard (void)
+{
+  tcbhead_t *tcbhead = (void *) __thread_self - TLS_TCB_OFFSET;
+  return tcbhead[-1].pointer_guard;
+}
+
+static inline void set_pointer_guard (struct pthread *pd, uintptr_t guard)
+{
+  tcbhead_t *tcbhead = (void *) pd - TLS_TCB_OFFSET;
+  tcbhead[-1].pointer_guard = guard;
+}
+
+#endif
diff --git a/sysdeps/nios2/nptl/tls.h b/sysdeps/nios2/nptl/tls.h
index facb27c761..4a86f6b70c 100644
--- a/sysdeps/nios2/nptl/tls.h
+++ b/sysdeps/nios2/nptl/tls.h
@@ -25,7 +25,7 @@
 # include <stdbool.h>
 # include <stddef.h>
 # include <stdint.h>
-# include <dl-dtv.h>
+# include <tcbhead.h>
 
 #else /* __ASSEMBLER__ */
 # include <tcb-offsets.h>
@@ -44,15 +44,6 @@
 /* Get the thread descriptor definition.  */
 # include <nptl/descr.h>
 
-typedef struct
-{
-  dtv_t *dtv;
-  uintptr_t pointer_guard;
-  unsigned spare[6];
-} tcbhead_t;
-
-register struct pthread *__thread_self __asm__("r23");
-
 #define READ_THREAD_POINTER() ((void *) __thread_self)
 
 /* This is the size of the initial TCB.  Because our TCB is before the thread
@@ -74,10 +65,6 @@ register struct pthread *__thread_self __asm__("r23");
   (sizeof (struct pthread)						      \
    + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
 
-/* The thread pointer (in hardware register r23) points to the end of
-   the TCB + 0x7000, as for PowerPC and MIPS.  */
-# define TLS_TCB_OFFSET 0x7000
-
 /* Install the dtv pointer.  The pointer passed is to the element with
    index -1 which contain the length.  */
 # define INSTALL_DTV(tcbp, dtvp) \
@@ -122,15 +109,12 @@ register struct pthread *__thread_self __asm__("r23");
 # define THREAD_SETMEM_NC(descr, member, idx, value) \
   descr->member[idx] = (value)
 
-# define THREAD_GET_POINTER_GUARD()				\
-  (((tcbhead_t *) (READ_THREAD_POINTER ()			\
-		   - TLS_TCB_OFFSET))[-1].pointer_guard)
-# define THREAD_SET_POINTER_GUARD(value)	\
-  (THREAD_GET_POINTER_GUARD () = (value))
+# define THREAD_GET_POINTER_GUARD() \
+  get_pointer_guard ()
+# define THREAD_SET_POINTER_GUARD(value) \
+  set_pointer_guard (__thread_self, value)
 # define THREAD_COPY_POINTER_GUARD(descr)				\
-  (((tcbhead_t *) ((void *) (descr)					\
-		   + TLS_PRE_TCB_SIZE))[-1].pointer_guard		\
-   = THREAD_GET_POINTER_GUARD())
+  set_pointer_guard (descr, get_pointer_guard ())
 
 /* l_tls_offset == 0 is perfectly valid on Nios II, so we have to use some
    different value to mean unset l_tls_offset.  */
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index 319a7c7ac5..5b84583dc0 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
@@ -26,10 +26,9 @@
 /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO.  */
 #include <dl-sysdep.h>
 
-#include <tls.h>
-
 /* In order to get __set_errno() definition in INLINE_SYSCALL.  */
 #ifndef __ASSEMBLER__
+#include <stdint.h>
 #include <errno.h>
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/alpha/sysdep.h b/sysdeps/unix/sysv/linux/alpha/sysdep.h
index 7daf445068..625c09d9f4 100644
--- a/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ b/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -24,8 +24,6 @@
 #include <sysdeps/unix/sysdep.h>
 #include <dl-sysdep.h>         /* Defines RTLD_PRIVATE_ERRNO.  */
 
-#include <tls.h>
-
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
    of the kernel.  But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index e2985cffd7..26b3ef5cec 100644
--- a/sysdeps/unix/sysv/linux/arm/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arm/sysdep.h
@@ -27,8 +27,6 @@
 /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO.  */
 #include <dl-sysdep.h>
 
-#include <tls.h>
-
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
    of the kernel.  But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/csky/sysdep.h b/sysdeps/unix/sysv/linux/csky/sysdep.h
index 7e8e89dd42..6de2ebd143 100644
--- a/sysdeps/unix/sysv/linux/csky/sysdep.h
+++ b/sysdeps/unix/sysv/linux/csky/sysdep.h
@@ -27,10 +27,9 @@
 /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO.  */
 #include <dl-sysdep.h>
 
-#include <tls.h>
-
 /* In order to get __set_errno() definition in INLINE_SYSCALL.  */
 #ifndef __ASSEMBLER__
+# include <stdint.h>
 # include <errno.h>
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/generic/chmod.c b/sysdeps/unix/sysv/linux/generic/chmod.c
index 802e4006ee..8a5be52144 100644
--- a/sysdeps/unix/sysv/linux/generic/chmod.c
+++ b/sysdeps/unix/sysv/linux/generic/chmod.c
@@ -17,7 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
-#include <sys/types.h>
+#include <sys/stat.h>
 #include <sysdep.h>
 
 /* Change the protections of FILE to MODE.  */
diff --git a/sysdeps/unix/sysv/linux/getrlimit.c b/sysdeps/unix/sysv/linux/getrlimit.c
index 339d943bd2..7000e4d604 100644
--- a/sysdeps/unix/sysv/linux/getrlimit.c
+++ b/sysdeps/unix/sysv/linux/getrlimit.c
@@ -19,6 +19,7 @@
 #include <sys/resource.h>
 #include <sysdep.h>
 #include <shlib-compat.h>
+#include <sysdep.h>
 
 #if !__RLIM_T_MATCHES_RLIM64_T
 
diff --git a/sysdeps/unix/sysv/linux/gettimeofday.c b/sysdeps/unix/sysv/linux/gettimeofday.c
index 1c92e6d643..ffae2c2d5a 100644
--- a/sysdeps/unix/sysv/linux/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/gettimeofday.c
@@ -25,8 +25,8 @@
 # include <sysdep-vdso.h>
 
 # ifdef SHARED
-# include <dl-vdso.h>
-# include <libc-vdso.h>
+#  include <dl-vdso.h>
+#  include <libc-vdso.h>
 
 static int
 __gettimeofday_syscall (struct timeval *restrict tv, void *restrict tz)
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 03ed52552e..b03c8921fa 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -24,11 +24,12 @@
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/ia64/sysdep.h>
 #include <dl-sysdep.h>
-#include <tls.h>
 #include <asm/break.h>
+#include <tcb-offsets.h>
 
 /* In order to get __set_errno() definition in INLINE_SYSCALL.  */
 #ifndef __ASSEMBLER__
+#include <tcbhead.h>
 #include <errno.h>
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h
index 3e0ab605de..36e13569f1 100644
--- a/sysdeps/unix/sysv/linux/m68k/sysdep.h
+++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h
@@ -18,7 +18,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <sysdeps/unix/sysv/linux/sysdep.h>
-#include <tls.h>
 
 /* Defines RTLD_PRIVATE_ERRNO.  */
 #include <dl-sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index c5bcd90c25..08a50c2bb5 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
@@ -23,8 +23,6 @@
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/mips/mips32/sysdep.h>
 
-#include <tls.h>
-
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
    of the kernel.  But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
index 1882fe4e73..cdecafefc1 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/sysdep.h
@@ -23,8 +23,6 @@
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/mips/mips64/sysdep.h>
 
-#include <tls.h>
-
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
    of the kernel.  But these symbols do not follow the SYS_* syntax
diff --git a/sysdeps/unix/sysv/linux/mmap_internal.h b/sysdeps/unix/sysv/linux/mmap_internal.h
index d53f0c642a..cec8fdd738 100644
--- a/sysdeps/unix/sysv/linux/mmap_internal.h
+++ b/sysdeps/unix/sysv/linux/mmap_internal.h
@@ -19,6 +19,8 @@
 #ifndef MMAP_INTERNAL_LINUX_H
 #define MMAP_INTERNAL_LINUX_H 1
 
+#include <stdint.h>
+
 /* This is the minimum mmap2 unit size accept by the kernel.  An architecture
    with multiple minimum page sizes (such as m68k) might define it as -1 and
    thus it will queried at runtime.  */
diff --git a/sysdeps/unix/sysv/linux/msgget.c b/sysdeps/unix/sysv/linux/msgget.c
index 7968b738a4..6a629f18f3 100644
--- a/sysdeps/unix/sysv/linux/msgget.c
+++ b/sysdeps/unix/sysv/linux/msgget.c
@@ -18,8 +18,8 @@
 
 #include <sys/msg.h>
 #include <ipc_priv.h>
+#include <stddef.h>
 #include <sysdep.h>
-#include <errno.h>
 
 /* Return descriptor for message queue associated with KEY.  The MSGFLG
    parameter describes how to proceed with clashing of key values.  */
diff --git a/sysdeps/unix/sysv/linux/nios2/sysdep.h b/sysdeps/unix/sysv/linux/nios2/sysdep.h
index 520c9460a2..7f9c2e6a27 100644
--- a/sysdeps/unix/sysv/linux/nios2/sysdep.h
+++ b/sysdeps/unix/sysv/linux/nios2/sysdep.h
@@ -25,8 +25,9 @@
 
 /* For RTLD_PRIVATE_ERRNO.  */
 #include <dl-sysdep.h>
-
-#include <tls.h>
+#ifndef __ASSEMBLER__
+#include <tcbhead.h>
+#endif
 
 /* For Linux we can use the system call table in the header file
         /usr/include/asm/unistd.h
@@ -226,13 +227,14 @@
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
+# include <tcb-offsets.h>
 # ifdef __ASSEMBLER__
 #  define PTR_MANGLE_GUARD(guard) ldw guard, POINTER_GUARD(r23)
 #  define PTR_MANGLE(dst, src, guard) xor dst, src, guard
 #  define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard)
 # else
 #  define PTR_MANGLE(var) \
-  (var) = (__typeof (var)) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
+  (var) = (__typeof (var)) ((uintptr_t) (var) ^ get_pointer_guard ())
 #  define PTR_DEMANGLE(var)	PTR_MANGLE (var)
 # endif
 #endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/sysdep.h
index b2bca598b9..04de4bad4c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.h
@@ -21,7 +21,6 @@
 
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/powerpc/sysdep.h>
-#include <tls.h>
 /* Define __set_errno() for INLINE_SYSCALL macro below.  */
 #include <errno.h>
 
@@ -162,6 +161,7 @@
 /* We cannot use the thread descriptor because in ld.so we use setjmp
    earlier than the descriptor is initialized.  */
 #else
+# include <tcb-offsets.h>
 # ifdef __ASSEMBLER__
 #  if defined(__PPC64__) || defined(__powerpc64__)
 #   define LOAD  ld
diff --git a/sysdeps/unix/sysv/linux/semget.c b/sysdeps/unix/sysv/linux/semget.c
index 4ab606f584..128bd0982a 100644
--- a/sysdeps/unix/sysv/linux/semget.c
+++ b/sysdeps/unix/sysv/linux/semget.c
@@ -18,8 +18,8 @@
 
 #include <sys/sem.h>
 #include <ipc_priv.h>
+#include <stddef.h>
 #include <sysdep.h>
-#include <errno.h>
 
 /* Return identifier for array of NSEMS semaphores associated with
    KEY.  */
diff --git a/sysdeps/unix/sysv/linux/setrlimit.c b/sysdeps/unix/sysv/linux/setrlimit.c
index 6648fad5c0..4de5f6ccfa 100644
--- a/sysdeps/unix/sysv/linux/setrlimit.c
+++ b/sysdeps/unix/sysv/linux/setrlimit.c
@@ -19,6 +19,7 @@
 #include <sys/resource.h>
 #include <sysdep.h>
 #include <shlib-compat.h>
+#include <sysdep.h>
 
 #if !__RLIM_T_MATCHES_RLIM64_T
 
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h
index 60a5032ce4..e3dcb05280 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.h
@@ -23,7 +23,8 @@
 /* There is some commonality.  */
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/sh/sysdep.h>
-#include <tls.h>
+/* For RTLD_PRIVATE_ERRNO.  */
+#include <dl-sysdep.h>
 
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
@@ -324,6 +325,7 @@
    is too complicated here since we have no PC-relative addressing mode.  */
 #else
 # ifdef __ASSEMBLER__
+#  include <tcb-offsets.h>
 #  define PTR_MANGLE(reg, tmp) \
      stc gbr,tmp; mov.l @(POINTER_GUARD,tmp),tmp; xor tmp,reg
 #  define PTR_MANGLE2(reg, tmp)	xor tmp,reg
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index bf36875477..1dd51c8611 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -21,7 +21,7 @@
 /* There is some commonality.  */
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/x86_64/sysdep.h>
-#include <tls.h>
+#include <tcb-offsets.h>
 
 /* Defines RTLD_PRIVATE_ERRNO.  */
 #include <dl-sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c b/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
index dd39ffa8c2..1064aac84a 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
@@ -17,8 +17,7 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
-#include <sys/prctl.h>
-#include <sys/syscall.h>
+#include <asm/prctl.h>
 #include <sysdep.h>
 #include <stdint.h>
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h
index 62e6f8fe11..6718b4ffd6 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h
@@ -46,6 +46,7 @@
 # undef ZERO_EXTEND_6
 # define ZERO_EXTEND_6 movl %r9d, %r9d;
 #else /* !__ASSEMBLER__ */
+# include <stdint.h>
 # undef ARGIFY
 /* Enforce zero-extension for pointers and array system call arguments.
    For integer types, extend to int64_t (the full register) using a


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-29 21:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 21:43 [glibc/azanella/syscall-refactor] Remove tls.h include from sysdep.h Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).