Some architectures do not use the auto-generated tcb-offsets.h.
+++ /dev/null
-# Copyright (C) 2005-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
-PTHREAD_MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
-PTHREAD_TID_OFFSET offsetof (struct pthread, tid)
-PTHREAD_SIZEOF sizeof (struct pthread)
# include <stddef.h>
# include <stdint.h>
# include <dl-dtv.h>
-
-#else /* __ASSEMBLER__ */
-# include <tcb-offsets.h>
#endif /* __ASSEMBLER__ */
#ifndef __ASSEMBLER__
+++ /dev/null
-# Copyright (C) 2003-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
---
-
--- Abuse tls.h macros to derive offsets relative to the thread register.
--- # define __builtin_thread_pointer() ((void *) 0)
--- # define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
--- Ho hum, this doesn't work in gcc4, so Know Things about THREAD_SELF
-#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread))
-
-MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
-TID_OFFSET thread_offsetof (tid)
} \
while (0)
-#else /* __ASSEMBLER__ */
-# include <tcb-offsets.h>
#endif /* __ASSEMBLER__ */
#endif /* tls.h */
+++ /dev/null
-# NPTL makefile fragment for ARC.
-# Copyright (C) 2020-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
--- Derive offsets relative to the thread register.
-#define thread_offsetof(mem) (long)(offsetof (struct pthread, mem) - sizeof (struct pthread))
-
-MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
-TLS_PRE_TCB_SIZE sizeof (struct pthread)
-TLS_TCB_SIZE sizeof (tcbhead_t)
-
-PTHREAD_TID offsetof (struct pthread, tid)
# License along with the GNU C Library. If not, see
# <https://www.gnu.org/licenses/>.
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
-
ifeq ($(subdir),nptl)
# This test relies on compiling part of the binary with EH information,
# part without, and unwinding through. The .ARM.exidx tables have
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
---
-
--- Derive offsets relative to the thread register.
-#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread))
-
-MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
-TID_OFFSET thread_offsetof (tid)
# include <stddef.h>
# include <stdint.h>
# include <dl-dtv.h>
-
-#else /* __ASSEMBLER__ */
-# include <tcb-offsets.h>
#endif /* __ASSEMBLER__ */
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
-
ASFLAGS-.os += $(pic-ccflag)
ifeq ($(subdir),gmon)
+++ /dev/null
-# Copyright (C) 2018-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
---
-
--- Derive offsets relative to the thread register.
-#define thread_offsetof(mem) (long)(offsetof (struct pthread, mem) - sizeof (struct pthread))
-
-MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
-TID_OFFSET thread_offsetof (tid)
__result; })
#else
-# include <tcb-offsets.h>
/* Define r31 as thread pointer register. */
# define READ_THREAD_POINTER() \
mov r0, r31;
+++ /dev/null
-# Copyright (C) 2005-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <pthread.h>
-#include <tls.h>
-
-RESULT offsetof (struct pthread, result)
-TID offsetof (struct pthread, tid)
-CANCELHANDLING offsetof (struct pthread, cancelhandling)
-CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf)
-MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
-TLS_PRE_TCB_SIZE sizeof (struct pthread)
-MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
-
--- Use a thread_offset when working with asm to make things simpler
--- This way we get the offset of a member in the struct pthread that
--- preceeds the thread pointer (which points to the dtv).
-#define thread_offsetof(mem) (unsigned int)(offsetof(struct pthread, mem) - sizeof(struct pthread))
-TID_THREAD_OFFSET thread_offsetof (tid)
-MULTIPLE_THREADS_THREAD_OFFSET thread_offsetof (header.multiple_threads)
# include <stddef.h>
# include <stdint.h>
# include <dl-dtv.h>
-
-#else /* __ASSEMBLER__ */
-# include <tcb-offsets.h>
#endif /* __ASSEMBLER__ */
#ifndef __ASSEMBLER__
+++ /dev/null
-# Copyright (C) 2010-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
---
-
--- Derive offsets relative to the thread register.
-#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
-
-MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
-TID_OFFSET thread_offsetof (tid)
# include <stddef.h>
# include <stdint.h>
# include <dl-dtv.h>
-
-#else /* __ASSEMBLER__ */
-# include <tcb-offsets.h>
#endif /* __ASSEMBLER__ */
#ifndef __ASSEMBLER__
+++ /dev/null
-# Copyright (C) 2005-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
---
-
--- Abuse tls.h macros to derive offsets relative to the thread register.
-#define thread_offsetof(mem) (long)(offsetof (struct pthread, mem) - sizeof (struct pthread))
-
-MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
-TID_OFFSET thread_offsetof (tid)
# include <stddef.h>
# include <stdint.h>
# include <dl-dtv.h>
-
-#else /* __ASSEMBLER__ */
-# include <tcb-offsets.h>
#endif /* __ASSEMBLER__ */
#ifndef __ASSEMBLER__
+++ /dev/null
-# Copyright (C) 2005-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
---
-
--- Abuse tls.h macros to derive offsets relative to the thread register.
-#define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
-
-MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
-TID_OFFSET thread_offsetof (tid)
#endif
#else /* __ASSEMBLER__ */
-# include <tcb-offsets.h>
-
# if __mips_isa_rev >= 2
# define READ_THREAD_POINTER(rd) rdhwr rd, $29
# else
ifeq ($(subdir),soft-fp)
sysdep_routines += $(gcc-single-routines) $(gcc-double-routines)
endif
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-# Makefile for sysdeps/riscv/nptl.
-# Copyright (C) 2005-2021 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/>.
-
-ifeq ($(subdir),csu)
-gen-as-const-headers += tcb-offsets.sym
-endif
+++ /dev/null
-#include <sysdep.h>
-#include <tls.h>
-
-#define thread_offsetof(mem) (long)(offsetof (struct pthread, mem) - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
-
-MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)