From d063d164335938d557460bebaa7cfe388157b627 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 10 Sep 2011 16:50:28 -0400 Subject: Remove support for !USE___THREAD --- sysdeps/i386/dl-machine.h | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) (limited to 'sysdeps/i386/dl-machine.h') diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index a093d2b151..d1a83ee0f2 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. i386 version. - Copyright (C) 1995-2005, 2006, 2009 Free Software Foundation, Inc. + Copyright (C) 1995-2005, 2006, 2009, 2011 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 @@ -243,18 +243,12 @@ _dl_start_user:\n\ define the value. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one of the main executable's symbols, as for a COPY reloc. */ -#if !defined RTLD_BOOTSTRAP || USE___THREAD # define elf_machine_type_class(type) \ ((((type) == R_386_JMP_SLOT || (type) == R_386_TLS_DTPMOD32 \ || (type) == R_386_TLS_DTPOFF32 || (type) == R_386_TLS_TPOFF32 \ || (type) == R_386_TLS_TPOFF || (type) == R_386_TLS_DESC) \ * ELF_RTYPE_CLASS_PLT) \ | (((type) == R_386_COPY) * ELF_RTYPE_CLASS_COPY)) -#else -# define elf_machine_type_class(type) \ - ((((type) == R_386_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \ - | (((type) == R_386_COPY) * ELF_RTYPE_CLASS_COPY)) -#endif /* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */ #define ELF_MACHINE_JMP_SLOT R_386_JMP_SLOT @@ -357,44 +351,43 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, *reloc_addr = value; break; -# if !defined RTLD_BOOTSTRAP || USE___THREAD case R_386_TLS_DTPMOD32: -# ifdef RTLD_BOOTSTRAP +# ifdef RTLD_BOOTSTRAP /* During startup the dynamic linker is always the module with index 1. XXX If this relocation is necessary move before RESOLVE call. */ *reloc_addr = 1; -# else +# else /* Get the information from the link map returned by the resolv function. */ if (sym_map != NULL) *reloc_addr = sym_map->l_tls_modid; -# endif +# endif break; case R_386_TLS_DTPOFF32: -# ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP /* During relocation all TLS symbols are defined and used. Therefore the offset is already correct. */ if (sym != NULL) *reloc_addr = sym->st_value; -# endif +# endif break; case R_386_TLS_DESC: { struct tlsdesc volatile *td = (struct tlsdesc volatile *)reloc_addr; -# ifndef RTLD_BOOTSTRAP +# ifndef RTLD_BOOTSTRAP if (! sym) td->entry = _dl_tlsdesc_undefweak; else -# endif +# endif { -# ifndef RTLD_BOOTSTRAP -# ifndef SHARED +# ifndef RTLD_BOOTSTRAP +# ifndef SHARED CHECK_STATIC_TLS (map, sym_map); -# else +# else if (!TRY_STATIC_TLS (map, sym_map)) { td->arg = _dl_make_tlsdesc_dynamic @@ -402,8 +395,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, td->entry = _dl_tlsdesc_dynamic; } else -# endif # endif +# endif { td->arg = (void*)(sym->st_value - sym_map->l_tls_offset + (ElfW(Word))td->arg); @@ -426,13 +419,13 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, CHECK_STATIC_TLS (map, sym_map); *reloc_addr += sym_map->l_tls_offset - sym->st_value; } -# endif +# endif break; case R_386_TLS_TPOFF: /* The offset is negative, forward from the thread pointer. */ -# ifdef RTLD_BOOTSTRAP +# ifdef RTLD_BOOTSTRAP *reloc_addr += sym->st_value - map->l_tls_offset; -# else +# else /* We know the offset of object the symbol is contained in. It is a negative value which will be added to the thread pointer. */ @@ -441,9 +434,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, CHECK_STATIC_TLS (map, sym_map); *reloc_addr += sym->st_value - sym_map->l_tls_offset; } -# endif +# endif break; -# endif /* use TLS */ # ifndef RTLD_BOOTSTRAP case R_386_32: -- cgit 1.4.1