|
Packit Service |
82fcde |
/* Thread-local storage handling in the ELF dynamic linker. i386 version.
|
|
Packit Service |
82fcde |
Copyright (C) 2002-2018 Free Software Foundation, Inc.
|
|
Packit Service |
82fcde |
This file is part of the GNU C Library.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
82fcde |
modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License as published by the Free Software Foundation; either
|
|
Packit Service |
82fcde |
version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
82fcde |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
82fcde |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
82fcde |
Lesser General Public License for more details.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License along with the GNU C Library; if not, see
|
|
Packit Service |
82fcde |
<http://www.gnu.org/licenses/>. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Type used for the representation of TLS information in the GOT. */
|
|
Packit Service |
82fcde |
typedef struct dl_tls_index
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
unsigned long int ti_module;
|
|
Packit Service |
82fcde |
unsigned long int ti_offset;
|
|
Packit Service |
82fcde |
} tls_index;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifdef SHARED
|
|
Packit Service |
82fcde |
/* This is the prototype for the GNU version. */
|
|
Packit Service |
82fcde |
extern void *___tls_get_addr (tls_index *ti)
|
|
Packit Service |
82fcde |
__attribute__ ((__regparm__ (1)));
|
|
Packit Service |
82fcde |
extern void *___tls_get_addr_internal (tls_index *ti)
|
|
Packit Service |
82fcde |
__attribute__ ((__regparm__ (1))) attribute_hidden;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# if IS_IN (rtld)
|
|
Packit Service |
82fcde |
/* The special thing about the x86 TLS ABI is that we have two
|
|
Packit Service |
82fcde |
variants of the __tls_get_addr function with different calling
|
|
Packit Service |
82fcde |
conventions. The GNU version, which we are mostly concerned here,
|
|
Packit Service |
82fcde |
takes the parameter in a register. The name is changed by adding
|
|
Packit Service |
82fcde |
an additional underscore at the beginning. The Sun version uses
|
|
Packit Service |
82fcde |
the normal calling convention. */
|
|
Packit Service |
82fcde |
void *
|
|
Packit Service |
82fcde |
__tls_get_addr (tls_index *ti)
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
return ___tls_get_addr_internal (ti);
|
|
Packit Service |
82fcde |
}
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Prepare using the definition of __tls_get_addr in the generic
|
|
Packit Service |
82fcde |
version of this file. */
|
|
Packit Service |
82fcde |
# define __tls_get_addr __attribute__ ((__regparm__ (1))) ___tls_get_addr
|
|
Packit Service |
82fcde |
strong_alias (___tls_get_addr, ___tls_get_addr_internal)
|
|
Packit Service |
82fcde |
rtld_hidden_proto (___tls_get_addr)
|
|
Packit Service |
82fcde |
rtld_hidden_def (___tls_get_addr)
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Users should get the better interface. */
|
|
Packit Service |
82fcde |
# define __tls_get_addr ___tls_get_addr
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# endif
|
|
Packit Service |
82fcde |
#endif
|