about summary refs log tree commit diff
path: root/sysdeps/i386/dl-tls.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-07 04:08:19 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-07 04:08:19 +0000
commit3fb558781fe9bdad55c25157eaea0531e727ba39 (patch)
treee60fe01b6a6ee1826e05e50924e5b6a4bcf253b2 /sysdeps/i386/dl-tls.h
parenta53a253b90b2cd722ac6718464931cf920b56cf4 (diff)
downloadglibc-3fb558781fe9bdad55c25157eaea0531e727ba39.tar.gz
glibc-3fb558781fe9bdad55c25157eaea0531e727ba39.tar.xz
glibc-3fb558781fe9bdad55c25157eaea0531e727ba39.zip
Update.
2002-02-06  Ulrich Drepper  <drepper@redhat.com>

	* Versions.def [ld]: Add GLIBC_2.3.
	* elf/Versions [ld]: Add __tls_get_addr to GLIBC_2.3.
	* elf/Makefile (dl-routines): Add dl-tls.
	(distribute): Add dl-tls.h.
	* sysdeps/generic/ldsodefs.h (struct rtld_global): Remove
	_dl_tls_module_cnt, add _dl_tls_max_dtv_idx and _dl_tls_dtv_gaps.
	Add prototypes for _dl_next_tls_modid and _dl_determine_tlsoffset.
	* elf/dl-load.c (_dl_map_object_from_fd): Store alignment requirement
	along with the other info in the link map.  Change queueing of init
	images for double linked list.  Use _dl_next_tls_modid to compute
	l_tls_modid.
	* elf/rtld.c (_dl_start_final): Store alignment requirement
	along with the other info in rtld map and executable map.
	(dl_main): Add ld.so to the init image list if necessary.  Compute
	final module ID with _dl_next_tls_modid.
	* include/link.h (struct link_map): Add l_tls_previmage and
	l_tls_align.
	* eld/dl-support.c: Define _dl_tls_max_dtv_idx and _dl_tls_dtv_gaps.
	* sysdeps/i386/elf/Versions: New file.
	* sysdeps/generic/dl-tls.c: New file.
	* sysdeps/generic/dl-tls.h: New file.
	* sysdeps/i386/dl-tls.h: New file.

	attribute((packed)) to counter stupid people misusing gcc options.
Diffstat (limited to 'sysdeps/i386/dl-tls.h')
-rw-r--r--sysdeps/i386/dl-tls.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/sysdeps/i386/dl-tls.h b/sysdeps/i386/dl-tls.h
new file mode 100644
index 0000000000..2ff1aa1ef7
--- /dev/null
+++ b/sysdeps/i386/dl-tls.h
@@ -0,0 +1,47 @@
+/* Thread-local storage handling in the ELF dynamic linker.  i386 version.
+   Copyright (C) 2002 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/* Type used for the representation of TLS information in the GOT.  */
+struct tls_index
+{
+  unsigned long int ti_module;
+  unsigned long int ti_offset;
+};
+
+
+/* This is the prototype for the GNU version.  */
+extern void *___tls_get_addr (struct tls_index *ti)
+     __attribute__ ((__regparm__ (1)));
+
+/* The special thing about the x86 TLS ABI is that we have two
+   variants of the __tls_get_addr function with different calling
+   conventions.  The GNU version, which we are mostly concerned here,
+   takes the parameter in a register.  The name is changed by adding
+   an additional underscore at the beginning.  The Sun version uses
+   the normal calling convention.  */
+void *
+__tls_get_addr (struct tls_index *ti)
+{
+  return ___tls_get_addr (ti);
+}
+
+
+/* Prepare using the definition of __tls_get_addr in the generic
+   version of this file.  */
+#define __tls_get_addr __attribute__ ((__regparm__ (1))) ___tls_get_addr