]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/sparc/sparc64/dl-machine.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / sparc / sparc64 / dl-machine.h
index d6d20c72948a014a01b969c8e2393a49a1a76996..713aeb7734293689a654d1585eeecd5a00de47d3 100644 (file)
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  Sparc64 version.
-   Copyright (C) 1997-2013 Free Software Foundation, Inc.
+   Copyright (C) 1997-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -106,7 +106,7 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
 
 /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
    PLT entries should not be allowed to define the value.
-   ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
+   ELF_RTYPE_CLASS_COPY iff TYPE should not be allowed to resolve to one
    of the main executable's symbols, as for a COPY reloc.  */
 #define elf_machine_type_class(type) \
   ((((type) == R_SPARC_JMP_SLOT                                                      \
@@ -119,6 +119,7 @@ elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
 
 /* The SPARC never uses Elf64_Rel relocations.  */
 #define ELF_MACHINE_NO_REL 1
+#define ELF_MACHINE_NO_RELA 0
 
 /* Set up the loaded object described by L so its unrelocated PLT
    entries will jump to the on-demand fixup code in dl-runtime.c.  */
@@ -332,7 +333,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 "      add     %o3, 8, %o3\n"                                          \
 "      mov     %i5, %o1\n"                                             \
 "      add     %o2, %o3, %o3\n"                                        \
-"      call    _dl_init_internal\n"                                    \
+"      call    _dl_init\n"                                             \
 "       ldx    [%o0], %o0\n"                                           \
 "   /* Pass our finalizer function to the user in %g1.  */\n"          \
        RTLD_GOT_ADDRESS(%l7, %g1, _dl_fini)                            \
@@ -377,17 +378,17 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
   weak_extern (_dl_rtld_map);
 #endif
 
-  if (__builtin_expect (r_type == R_SPARC_NONE, 0))
+  if (__glibc_unlikely (r_type == R_SPARC_NONE))
     return;
 
-  if (__builtin_expect (r_type == R_SPARC_SIZE64, 0))
+  if (__glibc_unlikely (r_type == R_SPARC_SIZE64))
     {
       *reloc_addr = sym->st_size + reloc->r_addend;
       return;
     }
 
 #if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
-  if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
+  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. */
@@ -436,8 +437,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
          strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
          _dl_error_printf ("\
 %s: Symbol `%s' has different size in shared object, consider re-linking\n",
-                           rtld_progname ?: "<program name unknown>",
-                           strtab + refsym->st_name);
+                           RTLD_PROGNAME, strtab + refsym->st_name);
        }
       memcpy (reloc_addr_arg, (void *) value,
              MIN (sym->st_size, refsym->st_size));
@@ -653,13 +653,13 @@ elf_machine_lazy_rel (struct link_map *map,
   Elf64_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
   const unsigned int r_type = ELF64_R_TYPE (reloc->r_info);
 
-  if (__builtin_expect (r_type == R_SPARC_JMP_SLOT, 1))
+  if (__glibc_likely (r_type == R_SPARC_JMP_SLOT))
     ;
   else if (r_type == R_SPARC_JMP_IREL
           || r_type == R_SPARC_IRELATIVE)
     {
       Elf64_Addr value = map->l_addr + reloc->r_addend;
-      if (__builtin_expect (!skip_ifunc, 1))
+      if (__glibc_likely (!skip_ifunc))
        value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
       if (r_type == R_SPARC_JMP_IREL)
        {