diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2017-10-20 17:10:50 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2017-11-03 14:45:26 +0000 |
commit | 2c1d4e5fe4e722e0b747d6bddd7ce3a6b1766c52 (patch) | |
tree | 21f3626b8ac22468dbd0f7601dd6b84ffe991460 /sysdeps | |
parent | 91c5a366d8d398d2fc4542f961c93058a92ade6f (diff) | |
download | glibc-2c1d4e5fe4e722e0b747d6bddd7ce3a6b1766c52.tar.gz glibc-2c1d4e5fe4e722e0b747d6bddd7ce3a6b1766c52.tar.xz glibc-2c1d4e5fe4e722e0b747d6bddd7ce3a6b1766c52.zip |
[BZ #17078] arm: remove prelinker support for R_ARM_TLS_DESC
This patch reverts commit 9c82da17b5794efebe005de2fd22d61a3ea4b58a Author: Maciej W. Rozycki <macro@codesourcery.com> Date: 2014-07-17 19:22:05 +0100 [BZ #17078] ARM: R_ARM_TLS_DESC prelinker support This only implemented support for the lazy binding case (and thus closed the bugzilla ticket prematurely), however tlsdesc on arm is not correct with lazy binding because there is a data race between the lazy initialization code and tlsdesc resolver functions. Lazy initialization of tlsdesc entries will be removed from arm to fix the data races and thus this half-finished prelinker support is no longer useful. [BZ #17078] * sysdeps/arm/dl-machine.h (elf_machine_rela): Remove the R_ARM_TLS_DESC case. (elf_machine_lazy_rel): Remove the prelink check.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/arm/dl-machine.h | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index 7e2d73e3d4..bf5f5d205c 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -594,32 +594,6 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_ARM_ABS32: *reloc_addr = value + reloc->r_addend; break; -# ifdef RESOLVE_CONFLICT_FIND_MAP - case R_ARM_TLS_DESC: - { - struct tlsdesc volatile *td __attribute__ ((unused)) = - (struct tlsdesc volatile *) reloc_addr; - - RESOLVE_CONFLICT_FIND_MAP (map, reloc_addr); - - /* Make sure we know what's going on. */ - assert (td->entry - == (void *) (D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)]) - + map->l_addr)); - assert (map->l_info[ADDRIDX (DT_TLSDESC_GOT)]); - - /* Set up the lazy resolver and store the pointer to our link - map in _GLOBAL_OFFSET_TABLE[1] now as for a prelinked - binary elf_machine_runtime_setup() is not called and hence - neither has been initialized. */ - *(Elf32_Addr *) (D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_GOT)]) - + map->l_addr) - = (Elf32_Addr) &_dl_tlsdesc_lazy_resolver; - ((Elf32_Addr *) D_PTR (map, l_info[DT_PLTGOT]))[1] - = (Elf32_Addr) map; - } - break; -# endif /* RESOLVE_CONFLICT_FIND_MAP */ case R_ARM_PC24: relocate_pc24 (map, value, reloc_addr, reloc->r_addend); break; @@ -699,11 +673,9 @@ elf_machine_lazy_rel (struct link_map *map, (struct tlsdesc volatile *)reloc_addr; /* The linker must have given us the parameter we need in the - first GOT entry, and left the second one empty. The latter - will have been preset by the prelinker if used though. - We fill it with the resolver address. */ - assert (td->entry == 0 - || map->l_info[VALIDX (DT_GNU_PRELINKED)] != NULL); + first GOT entry, and left the second one empty. We fill the + latter with the resolver address. */ + assert (td->entry == 0); td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)]) + map->l_addr); } |