public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] Makes it compile for AArch64
@ 2021-08-28  0:31 Fangrui Song
  0 siblings, 0 replies; 3+ messages in thread
From: Fangrui Song @ 2021-08-28  0:31 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e1c6d2b0f4f3b934346856efa1ba0aecfb5c5e36

commit e1c6d2b0f4f3b934346856efa1ba0aecfb5c5e36
Author: Shu-Chun Weng <scw@google.com>
Date:   Fri Apr 19 14:50:50 2019 -0700

    Makes it compile for AArch64
    
    De-nesting fix in 83c02e85 changed function signature but AArch64 was untested.

Diff:
---
 sysdeps/aarch64/dl-machine.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 7ce3c8eb8b..db67301333 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -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)))
     {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [glibc/maskray/grte] Makes it compile for AArch64
@ 2021-08-28  0:27 Fangrui Song
  0 siblings, 0 replies; 3+ messages in thread
From: Fangrui Song @ 2021-08-28  0:27 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7a324defcffaec123c7e3cef2d90809773e0869d

commit 7a324defcffaec123c7e3cef2d90809773e0869d
Author: Shu-Chun Weng <scw@google.com>
Date:   Fri Apr 19 14:50:50 2019 -0700

    Makes it compile for AArch64
    
    De-nesting fix in 83c02e85 changed function signature but AArch64 was untested.

Diff:
---
 sysdeps/aarch64/dl-machine.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 7ce3c8eb8b..db67301333 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -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)))
     {


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [glibc/maskray/grte] Makes it compile for AArch64
@ 2021-08-27 23:50 Fangrui Song
  0 siblings, 0 replies; 3+ messages in thread
From: Fangrui Song @ 2021-08-27 23:50 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=43fc40ae2d4b017d4bd5162be99c2a5805555824

commit 43fc40ae2d4b017d4bd5162be99c2a5805555824
Author: Shu-Chun Weng <scw@google.com>
Date:   Fri Apr 19 14:50:50 2019 -0700

    Makes it compile for AArch64
    
    De-nesting fix in 83c02e85 changed function signature but AArch64 was untested.

Diff:
---
 sysdeps/aarch64/dl-machine.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 7ce3c8eb8b..db67301333 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -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)))
     {


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-28  0:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-28  0:31 [glibc/maskray/grte] Makes it compile for AArch64 Fangrui Song
  -- strict thread matches above, loose matches on Subject: below --
2021-08-28  0:27 Fangrui Song
2021-08-27 23:50 Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).