d8307d
commit 30ba0375464f34e4bf8129f3d3dc14d0c09add17
d8307d
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
d8307d
Date:   Tue Jul 9 12:11:39 2019 +0100
d8307d
d8307d
    aarch64: simplify the DT_AARCH64_VARIANT_PCS handling code
d8307d
    
d8307d
    Remove unnecessary variant_pcs field: the dynamic tag can be checked
d8307d
    directly.
d8307d
    
d8307d
            * sysdeps/aarch64/dl-machine.h (elf_machine_runtime_setup): Remove the
d8307d
            DT_AARCH64_VARIANT_PCS check.
d8307d
            (elf_machine_lazy_rel): Use l_info[DT_AARCH64 (VARIANT_PCS)].
d8307d
            * sysdeps/aarch64/linkmap.h (struct link_map_machine): Remove
d8307d
            variant_pcs.
d8307d
d8307d
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
d8307d
index d4494852b32b8783..b39eae4acf4086ee 100644
d8307d
--- a/sysdeps/aarch64/dl-machine.h
d8307d
+++ b/sysdeps/aarch64/dl-machine.h
d8307d
@@ -105,10 +105,6 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
d8307d
 	}
d8307d
     }
d8307d
 
d8307d
-  /* Check if STO_AARCH64_VARIANT_PCS needs to be handled.  */
d8307d
-  if (l->l_info[DT_AARCH64 (VARIANT_PCS)])
d8307d
-    l->l_mach.variant_pcs = 1;
d8307d
-
d8307d
   return lazy;
d8307d
 }
d8307d
 
d8307d
@@ -402,7 +398,7 @@ elf_machine_lazy_rel (struct link_map *map,
d8307d
 	  return;
d8307d
 	}
d8307d
 
d8307d
-      if (__glibc_unlikely (map->l_mach.variant_pcs))
d8307d
+      if (__glibc_unlikely (map->l_info[DT_AARCH64 (VARIANT_PCS)] != NULL))
d8307d
 	{
d8307d
 	  /* Check the symbol table for variant PCS symbols.  */
d8307d
 	  const Elf_Symndx symndx = ELFW (R_SYM) (reloc->r_info);
d8307d
diff --git a/sysdeps/aarch64/linkmap.h b/sysdeps/aarch64/linkmap.h
d8307d
index dd8597470c3d2174..6852f343a1efd150 100644
d8307d
--- a/sysdeps/aarch64/linkmap.h
d8307d
+++ b/sysdeps/aarch64/linkmap.h
d8307d
@@ -20,5 +20,4 @@ struct link_map_machine
d8307d
 {
d8307d
   ElfW(Addr) plt;	  /* Address of .plt */
d8307d
   void *tlsdesc_table;	  /* Address of TLS descriptor hash table.  */
d8307d
-  int variant_pcs;	  /* If set, PLT calls may follow a variant PCS.  */
d8307d
 };