Back to index

glibc  2.9
dl-tlsdesc.h
Go to the documentation of this file.
00001 /* Thread-local storage descriptor handling in the ELF dynamic linker.
00002    i386 version.
00003    Copyright (C) 2005, 2008 Free Software Foundation, Inc.
00004    This file is part of the GNU C Library.
00005 
00006    The GNU C Library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2.1 of the License, or (at your option) any later version.
00010 
00011    The GNU C Library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with the GNU C Library; if not, write to the Free
00018    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019    02111-1307 USA.  */
00020 
00021 #ifndef _I386_DL_TLSDESC_H
00022 # define _I386_DL_TLSDESC_H 1
00023 
00024 /* Type used to represent a TLS descriptor in the GOT.  */
00025 struct tlsdesc
00026 {
00027   ptrdiff_t __attribute__ ((regparm (1))) (*entry) (struct tlsdesc *);
00028   void *arg;
00029 };
00030 
00031 typedef struct dl_tls_index
00032 {
00033   unsigned long int ti_module;
00034   unsigned long int ti_offset;
00035 } tls_index;
00036 
00037 /* Type used as the argument in a TLS descriptor for a symbol that
00038    needs dynamic TLS offsets.  */
00039 struct tlsdesc_dynamic_arg
00040 {
00041   tls_index tlsinfo;
00042   size_t gen_count;
00043 };
00044 
00045 extern ptrdiff_t attribute_hidden __attribute__ ((regparm (1)))
00046   _dl_tlsdesc_return (struct tlsdesc *),
00047   _dl_tlsdesc_undefweak (struct tlsdesc *),
00048   _dl_tlsdesc_resolve_abs_plus_addend (struct tlsdesc *),
00049   _dl_tlsdesc_resolve_rel (struct tlsdesc *),
00050   _dl_tlsdesc_resolve_rela (struct tlsdesc *),
00051   _dl_tlsdesc_resolve_hold (struct tlsdesc *);
00052 
00053 # ifdef SHARED
00054 extern void *internal_function _dl_make_tlsdesc_dynamic (struct link_map *map,
00055                                                   size_t ti_offset);
00056 
00057 extern ptrdiff_t attribute_hidden __attribute__ ((regparm (1)))
00058   _dl_tlsdesc_dynamic (struct tlsdesc *);
00059 # endif
00060 
00061 #endif