[BZ #17078] arm: remove prelinker support for R_ARM_TLS_DESC
This patch reverts
commit 9c82da17b5
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.
This commit is contained in:
parent
91c5a366d8
commit
2c1d4e5fe4
|
@ -1,3 +1,10 @@
|
|||
2017-11-03 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
[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.
|
||||
|
||||
2017-11-03 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
* sysdeps/aarch64/dl-machine.h (elf_machine_runtime_setup): Remove
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue