]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64: simplify the DT_AARCH64_VARIANT_PCS handling code
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 9 Jul 2019 11:11:39 +0000 (12:11 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 10 Jul 2019 14:28:00 +0000 (15:28 +0100)
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.

ChangeLog
sysdeps/aarch64/dl-machine.h
sysdeps/aarch64/linkmap.h

index d3c5e296394bdb0b7c6676d512f8231df439621d..dd99d9883b2079b1bb124c3876ceeebf5eb4ed3f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-07-10  Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+       * 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  <schwab@suse.de>
 
        [BZ #23352]
index 4f27637b2012a74fb8cfc2e73b09ed29eb7e2a50..9b2e0ffdbf9b32ecbc44e2d70ff0151536bbb652 100644 (file)
@@ -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;
 }
 
@@ -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);
index 7f801b14db2fa0cd2df7cafc1e7a1f9d629455dc..ba74fe10e12e2a525aa62c1d3dea5ecb3790c6b2 100644 (file)
@@ -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.  */
 };