aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/arm/dl-machine.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-03-01 09:44:29 +0000
committerUlrich Drepper <drepper@redhat.com>2002-03-01 09:44:29 +0000
commite6caf4e12ebb89254977a74b882757e371c5cc16 (patch)
tree294c7931b89d526659023e762272b36ad53744a3 /sysdeps/arm/dl-machine.h
parent90a77d0a958c5822ad8a2f479c466a6f4d093e74 (diff)
downloadglibc-e6caf4e12ebb89254977a74b882757e371c5cc16.tar
glibc-e6caf4e12ebb89254977a74b882757e371c5cc16.tar.gz
glibc-e6caf4e12ebb89254977a74b882757e371c5cc16.tar.bz2
glibc-e6caf4e12ebb89254977a74b882757e371c5cc16.zip
Update.
2002-03-01 Ulrich Drepper <drepper@redhat.com> * elf/Makefile (dl-routines): Add dl-origin. (elide-routines.os): Add dl-origin. * elf/Versions [ld] (GLIBC_PRIVATE): Add _dl_get_origin. * elf/dl-debug.c (_dl_debug_initialize): Add missing INTUSE around _dl_debug_state. * include/libc-symbols.c: Define attribute_hidden depending on HAVE_VISIBILITY_ATTRIBUTE. Add definition of INTVARDEF. * elf/dl-deps.c: Use INTUSE with __libc_enable_secure. * elf/dl-load.c: Likewise. * elf/rtld.c: Likewise. * include/unistd.h: Declare __libc_enable_secure_internal. * sysdeps/generic/dl-sysdep.c: Use INTVARDEF with __libc_enable_secure. Use INTUSE with __libc_enable_secure. * sysdeps/mach/hurd/dl-sysdep.c: Likewise. * elf/dl-deps.c: Use INTUSE with _dl_out_of_memory. * elf/dl-error.c: Likewise, * sysdeps/generic/ldsodefs.h: Declare _dl_out_of_memory_internal. * elf/dl-dst.h [_RTLD_GLOBAL]: Define _dl_get_origin to use INTUSE. * sysdeps/generic/dl-origin.c: Undefine _dl_get_origin macro before function definition. Use INTDEF with _dl_get_origin. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * elf/dl-init.c: Use INTUSE with _dl_starting_up. * elf/rtld.c: Likewise. Use INTVARDEF for _dl_starting_up. * elf/dl-profile.c: Use INTDEF for _dl_mcount. * elf/dl-runtime.c: Use INTUSE with _dl_mcount. * sysdeps/generic/ldsodefs.h: Declare _dl_mcount_internal. * elf/dl-conflict.c: Use rtld_progrname instead of _dl_argv[0]. * elf/dl-deps.c: Likewise. * elf/dl-error.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/cris/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc-32/dl-machine.h: Likewise. * sysdeps/sparc/sparc-64/dl-machine.h: Likewise. * sysdeps/x86_64/dl-machine.h: Likewise. * elf/rtld.c: Use INTDEF for _dl_argv. Use rtld_progrname instead of _dl_argv[0]. Use INTUSE with _dl_argv. * sysdeps/generic/dl-sysdep.c: Use INTUSE with _dl_argv. * sysdeps/generic/ldsodefs.h: Define rtld_progname macro.
Diffstat (limited to 'sysdeps/arm/dl-machine.h')
-rw-r--r--sysdeps/arm/dl-machine.h40
1 files changed, 18 insertions, 22 deletions
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
index 177a375be5..4a7ab3867c 100644
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -377,11 +377,9 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
/* ARM never uses Elf32_Rela relocations for the dynamic linker.
Prelinked libraries may use Elf32_Rela though. */
-#ifdef RTLD_BOOTSTRAP
-#define ELF_MACHINE_NO_RELA 1
-#endif
-
-extern char **_dl_argv;
+# ifdef RTLD_BOOTSTRAP
+# define ELF_MACHINE_NO_RELA 1
+# endif
/* Deal with an out-of-range PC24 reloc. */
static Elf32_Addr
@@ -426,15 +424,15 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
if (__builtin_expect (r_type == R_ARM_RELATIVE, 0))
{
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
-#endif
+# endif
*reloc_addr += map->l_addr;
}
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
else if (__builtin_expect (r_type == R_ARM_NONE, 0))
return;
-#endif
+# endif
else
{
const Elf32_Sym *const refsym = sym;
@@ -457,7 +455,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *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",
- _dl_argv[0] ?: "<program name unknown>",
+ rtld_progname ?: "<program name unknown>",
strtab + refsym->st_name);
}
memcpy (reloc_addr, (void *) value, MIN (sym->st_size,
@@ -465,26 +463,26 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
break;
case R_ARM_GLOB_DAT:
case R_ARM_JUMP_SLOT:
-#ifdef RTLD_BOOTSTRAP
+# ifdef RTLD_BOOTSTRAP
/* Fix weak undefined references. */
if (sym != NULL && sym->st_value == 0)
*reloc_addr = 0;
else
-#endif
+# endif
*reloc_addr = value;
break;
case R_ARM_ABS32:
{
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
/* 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. */
-# ifndef SHARED
+# ifndef SHARED
weak_extern (_dl_rtld_map);
-# endif
+# endif
if (map == &_dl_rtld_map)
/* Undo the relocation done here during bootstrapping.
Now we will relocate it anew, possibly using a
@@ -492,7 +490,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
rather than the dynamic linker's built-in definitions
used while loading those libraries. */
value -= map->l_addr + refsym->st_value;
-#endif
+# endif
*reloc_addr += value;
break;
}
@@ -529,7 +527,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
}
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
@@ -539,10 +537,8 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
if (__builtin_expect (r_type == R_ARM_RELATIVE, 0))
*reloc_addr = map->l_addr + reloc->r_addend;
-#ifndef RTLD_BOOTSTRAP
else if (__builtin_expect (r_type == R_ARM_NONE, 0))
return;
-#endif
else
{
const Elf32_Sym *const refsym = sym;
@@ -585,7 +581,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
}
}
}
-#endif
+# endif
static inline void
elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
@@ -594,14 +590,14 @@ elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc,
*reloc_addr += l_addr;
}
-#ifndef RTLD_BOOTSTRAP
+# ifndef RTLD_BOOTSTRAP
static inline void
elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
Elf32_Addr *const reloc_addr)
{
*reloc_addr = l_addr + reloc->r_addend;
}
-#endif
+# endif
static inline void
elf_machine_lazy_rel (struct link_map *map,