Skip to content

Commit

Permalink
aarch64: simplify the DT_AARCH64_VARIANT_PCS handling code
Browse files Browse the repository at this point in the history
Remove unnecessary variant_pcs field: the dynamic tag can be checked
directly.

	* sysdeps/aarch64/dl-machine.h (elf_machine_runtime_setup): Remove the
	DT_AARCH64_VARIANT_PCS check.
	(elf_machine_lazy_rel): Use l_info[DT_AARCH64 (VARIANT_PCS)].
	* sysdeps/aarch64/linkmap.h (struct link_map_machine): Remove
	variant_pcs.
  • Loading branch information
nsz-arm committed Jul 10, 2019
1 parent 32b8188 commit 30ba037
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2019-07-10 Szabolcs Nagy <[email protected]>

* sysdeps/aarch64/dl-machine.h (elf_machine_runtime_setup): Remove the
DT_AARCH64_VARIANT_PCS check.
(elf_machine_lazy_rel): Use l_info[DT_AARCH64 (VARIANT_PCS)].
* sysdeps/aarch64/linkmap.h (struct link_map_machine): Remove
variant_pcs.

2019-07-10 Andreas Schwab <[email protected]>

[BZ #23352]
Expand Down
6 changes: 1 addition & 5 deletions sysdeps/aarch64/dl-machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
}
}

/* Check if STO_AARCH64_VARIANT_PCS needs to be handled. */
if (l->l_info[DT_AARCH64 (VARIANT_PCS)])
l->l_mach.variant_pcs = 1;

return lazy;
}

Expand Down Expand Up @@ -402,7 +398,7 @@ elf_machine_lazy_rel (struct link_map *map,
return;
}

if (__glibc_unlikely (map->l_mach.variant_pcs))
if (__glibc_unlikely (map->l_info[DT_AARCH64 (VARIANT_PCS)] != NULL))
{
/* Check the symbol table for variant PCS symbols. */
const Elf_Symndx symndx = ELFW (R_SYM) (reloc->r_info);
Expand Down
1 change: 0 additions & 1 deletion sysdeps/aarch64/linkmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ struct link_map_machine
{
ElfW(Addr) plt; /* Address of .plt */
void *tlsdesc_table; /* Address of TLS descriptor hash table. */
int variant_pcs; /* If set, PLT calls may follow a variant PCS. */
};

0 comments on commit 30ba037

Please sign in to comment.