about summary refs log tree commit diff
path: root/sysdeps/sparc
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2022-04-04 17:19:07 -0700
committerFangrui Song <maskray@google.com>2022-04-04 17:19:07 -0700
commit3ee318c9233ce77dee099f2830e8e29a0c572ca7 (patch)
tree06a550c27bc52f0edab75f7f900ef32112a7eae2 /sysdeps/sparc
parent1c225a2dd16f20d7fb04157b4ac8a3f284bd686a (diff)
downloadglibc-3ee318c9233ce77dee099f2830e8e29a0c572ca7.tar.gz
glibc-3ee318c9233ce77dee099f2830e8e29a0c572ca7.tar.xz
glibc-3ee318c9233ce77dee099f2830e8e29a0c572ca7.zip
Remove -z combreloc and HAVE_Z_COMBRELOC
-z combreloc has been the default regadless of the architecture since
binutils commit f4d733664aabd7bd78c82895e030ec9779a92809 (2002). The
configure check added in commit fdde83499a05 (2001) has long been
unneeded.

We can therefore treat HAVE_Z_COMBRELOC as always 1 and delete dead code
paths in dl-machine.h files (many were copied from commit a711b01d34ca
and ee0cb67ec238).

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h16
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h16
2 files changed, 4 insertions, 28 deletions
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index e8d208a080..8c2408b1e6 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -303,15 +303,6 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[],
   const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
   struct link_map *sym_map = NULL;
 
-#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
-  /* This is defined in rtld.c, but nowhere in the static libc.a; make the
-     reference weak so static programs can still link.  This declaration
-     cannot be done when compiling rtld.c (i.e.  #ifdef RTLD_BOOTSTRAP)
-     because rtld.c contains the common defn for _dl_rtld_map, which is
-     incompatible with a weak decl in the same file.  */
-  weak_extern (_dl_rtld_map);
-#endif
-
   if (__glibc_unlikely (r_type == R_SPARC_NONE))
     return;
 
@@ -321,13 +312,10 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[],
       return;
     }
 
-#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
+#if !defined RTLD_BOOTSTRAP
   if (__glibc_unlikely (r_type == R_SPARC_RELATIVE))
     {
-# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
-      if (map != &_dl_rtld_map) /* Already done in rtld itself. */
-# endif
-	*reloc_addr += map->l_addr + reloc->r_addend;
+      *reloc_addr += map->l_addr + reloc->r_addend;
       return;
     }
 #endif
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index dc24dbc305..8c4bab14fc 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -324,15 +324,6 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[],
   const unsigned long int r_type = ELF64_R_TYPE_ID (reloc->r_info);
   struct link_map *sym_map = NULL;
 
-#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
-  /* This is defined in rtld.c, but nowhere in the static libc.a; make the
-     reference weak so static programs can still link.  This declaration
-     cannot be done when compiling rtld.c (i.e.  #ifdef RTLD_BOOTSTRAP)
-     because rtld.c contains the common defn for _dl_rtld_map, which is
-     incompatible with a weak decl in the same file.  */
-  weak_extern (_dl_rtld_map);
-#endif
-
   if (__glibc_unlikely (r_type == R_SPARC_NONE))
     return;
 
@@ -342,13 +333,10 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[],
       return;
     }
 
-#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
+#if !defined RTLD_BOOTSTRAP
   if (__glibc_unlikely (r_type == R_SPARC_RELATIVE))
     {
-# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
-      if (map != &_dl_rtld_map) /* Already done in rtld itself. */
-# endif
-	*reloc_addr += map->l_addr + reloc->r_addend;
+      *reloc_addr += map->l_addr + reloc->r_addend;
       return;
     }
 #endif