]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Makes it compile for AArch64
authorShu-Chun Weng <scw@google.com>
Fri, 19 Apr 2019 21:50:50 +0000 (14:50 -0700)
committerFangrui Song <i@maskray.me>
Sat, 28 Aug 2021 00:26:01 +0000 (17:26 -0700)
De-nesting fix in 83c02e85 changed function signature but AArch64 was untested.

sysdeps/aarch64/dl-machine.h

index 7ce3c8eb8bd0a3e4944d266ee12ead6c81deeb00..db67301333075d90656e9dcf038579e2e603e44a 100644 (file)
@@ -241,7 +241,11 @@ auto inline void
 __attribute__ ((always_inline))
 elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
                  const ElfW(Sym) *sym, const struct r_found_version *version,
-                 void *const reloc_addr_arg, int skip_ifunc)
+                 void *const reloc_addr_arg, int skip_ifunc
+#ifndef NESTING
+                 , struct link_map *boot_map
+#endif
+                  )
 {
   ElfW(Addr) *const reloc_addr = reloc_addr_arg;
   const unsigned int r_type = ELFW (R_TYPE) (reloc->r_info);
@@ -253,7 +257,11 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
   else
     {
       const ElfW(Sym) *const refsym = sym;
+#if !defined(NESTING) && (defined RTLD_BOOTSTRAP || defined STATIC_PIE_BOOTSTRAP)
+      struct link_map *sym_map = boot_map;
+#else
       struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
+#endif
       ElfW(Addr) value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
 
       if (sym != NULL
@@ -409,7 +417,11 @@ elf_machine_lazy_rel (struct link_map *map,
 
       /* Always initialize TLS descriptors completely, because lazy
         initialization requires synchronization at every TLS access.  */
-      elf_machine_rela (map, reloc, sym, version, reloc_addr, skip_ifunc);
+      elf_machine_rela (map, reloc, sym, version, reloc_addr, skip_ifunc
+#ifndef NESTING
+                       , NULL
+#endif
+                       );
     }
   else if (__glibc_unlikely (r_type == AARCH64_R(IRELATIVE)))
     {