]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 28 Aug 1998 22:54:57 +0000 (22:54 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 28 Aug 1998 22:54:57 +0000 (22:54 +0000)
1998-08-28 22:49  Ulrich Drepper  <drepper@cygnus.com>

* elf/do-rel.h (elf_dynamic_do_rel): Call elf_machine_lazy_rel
with load address, not map address.
* sysdeps/alpha/dl-machine.h (elf_machine_lazy_rel): Change first
parameter and use this value.
* sysdeps/arm/dl-machine.h: Likewise.
* sysdeps/i386/dl-machine.h: Likewise.
* sysdeps/m68k/dl-machine.h: Likewise.
* sysdeps/mips/dl-machine.h (elf_machine_lazy_rel): Change first
parameter.
* sysdeps/powerpc/dl-machine.h: Likewise
* sysdeps/sparc/sparc32/dl-machine.h: Likewise
* sysdeps/sparc/sparc64/dl-machine.h: Likewise

ChangeLog
elf/do-rel.h
sysdeps/alpha/dl-machine.h
sysdeps/arm/dl-machine.h
sysdeps/i386/dl-machine.h
sysdeps/m68k/dl-machine.h
sysdeps/mips/dl-machine.h
sysdeps/powerpc/dl-machine.h
sysdeps/sparc/sparc32/dl-machine.h
sysdeps/sparc/sparc64/dl-machine.h

index a6289448852b06b1fc004d4a4a14590cd188b90b..15c5b04a892fa364108e5152fff9110fcf798886 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+1998-08-28 22:49  Ulrich Drepper  <drepper@cygnus.com>
+
+       * elf/do-rel.h (elf_dynamic_do_rel): Call elf_machine_lazy_rel
+       with load address, not map address.
+       * sysdeps/alpha/dl-machine.h (elf_machine_lazy_rel): Change first
+       parameter and use this value.
+       * sysdeps/arm/dl-machine.h: Likewise.
+       * sysdeps/i386/dl-machine.h: Likewise.
+       * sysdeps/m68k/dl-machine.h: Likewise.
+       * sysdeps/mips/dl-machine.h (elf_machine_lazy_rel): Change first
+       parameter.
+       * sysdeps/powerpc/dl-machine.h: Likewise
+       * sysdeps/sparc/sparc32/dl-machine.h: Likewise
+       * sysdeps/sparc/sparc64/dl-machine.h: Likewise
+
 1998-08-28 09:22  Ulrich Drepper  <drepper@cygnus.com>
 
        * elf/rtld.c (process_envvars): Fix copy&paste error.
index 2e0f26bd053cbaf2be469ba194de443428850b71..c0f48241bfd933345ea33eee7bc6453e4614f5e7 100644 (file)
@@ -1,5 +1,5 @@
 /* Do relocations for ELF dynamic linking.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 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
@@ -44,9 +44,12 @@ elf_dynamic_do_rel (struct link_map *map,
   const ElfW(Rel) *end = (const ElfW(Rel) *)(map->l_addr + reladdr + relsize);
 
   if (lazy)
-    /* Doing lazy PLT relocations; they need very little info.  */
-    for (; r < end; ++r)
-      elf_machine_lazy_rel (map, r);
+    {
+      /* Doing lazy PLT relocations; they need very little info.  */
+      ElfW(Addr) l_addr = map->l_addr;
+      for (; r < end; ++r)
+       elf_machine_lazy_rel (l_addr, r);
+    }
   else
     {
       const ElfW(Sym) *const symtab =
index 8f639a94b910f564eb5203a162bb8f8ba7be0de4..648fb78ab0d13ed0d61f3de05008b6935a042f25 100644 (file)
@@ -448,16 +448,16 @@ elf_machine_rela (struct link_map *map,
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc)
+elf_machine_lazy_rel (Elf64_Addr l_addr, const Elf64_Rela *reloc)
 {
-  Elf64_Addr * const reloc_addr = (void *)(map->l_addr + reloc->r_offset);
+  Elf64_Addr * const reloc_addr = (void *)(l_addr + reloc->r_offset);
   unsigned long const r_type = ELF64_R_TYPE (reloc->r_info);
 
   if (r_type == R_ALPHA_JMP_SLOT)
     {
       /* Perform a RELATIVE reloc on the .got entry that transfers
         to the .plt.  */
-      *reloc_addr += map->l_addr;
+      *reloc_addr += l_addr;
     }
   else if (r_type == R_ALPHA_NONE)
     return;
index c40f9d72601e5ca35c5da23179509eebaef1f2b6..49e9d085aa91d3b4b2536f5e9f236ba267b47944 100644 (file)
@@ -166,7 +166,7 @@ _dl_runtime_resolve:
        mov     pc, ip
 
        .size _dl_runtime_resolve, .-_dl_runtime_resolve
-       
+
        .globl _dl_runtime_profile
        .type _dl_runtime_profile, #function
        .align 2
@@ -449,13 +449,13 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc)
+elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc)
 {
-  Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+  Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
   switch (ELF32_R_TYPE (reloc->r_info))
     {
     case R_ARM_JUMP_SLOT:
-      *reloc_addr += map->l_addr;
+      *reloc_addr += l_addr;
       break;
     default:
       assert (! "unexpected PLT reloc type");
index fdc9e48e0e4246386f4d89c0d5f317156928bcdd..a6d8974ab33a4676c17224d1152e9a477a2200d0 100644 (file)
@@ -384,18 +384,12 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rel *reloc)
+elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rel *reloc)
 {
-  Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
-  switch (ELF32_R_TYPE (reloc->r_info))
-    {
-    case R_386_JMP_SLOT:
-      *reloc_addr += map->l_addr;
-      break;
-    default:
-      assert (! "unexpected PLT reloc type");
-      break;
-    }
+  Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
+  /* Check for unexpected PLT reloc type.  */
+  assert (ELF32_R_TYPE (reloc->r_info) == R_386_JMP_SLOT);
+  *reloc_addr += l_addr;
 }
 
 #endif /* RESOLVE */
index 3e574802c4ef197ed0250f766545e281a10aa280..b8911dccc7c6ec80db74b18b8f6861727e2472f8 100644 (file)
@@ -320,13 +320,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
+elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc)
 {
-  Elf32_Addr *const reloc_addr = (void *) (map->l_addr + reloc->r_offset);
+  Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
   switch (ELF32_R_TYPE (reloc->r_info))
     {
     case R_68K_JMP_SLOT:
-      *reloc_addr += map->l_addr;
+      *reloc_addr += l_addr;
       break;
     default:
       assert (! "unexpected PLT reloc type");
index 7ee2e203436a7fea45f9c9db477044e69479effb..bbd22d87774317a971b295b1e02e24d9f7b07393 100644 (file)
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  MIPS version.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
 
@@ -582,7 +582,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const ElfW(Rel) *reloc)
+elf_machine_lazy_rel (Elf32_addr l_addr, const ElfW(Rel) *reloc)
 {
   /* Do nothing.  */
 }
index 6857f214a9f5f35a6fb64ac52d518d855823cbc1..ab75aa139039029068f75f202f52711234c0c01f 100644 (file)
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  PowerPC version.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998 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
@@ -543,7 +543,7 @@ elf_machine_runtime_setup (struct link_map *map, int lazy, int profile)
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
+elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc)
 {
   /* elf_machine_runtime_setup handles this. */
 }
index 5371e3ecee99edd06366c7ca7e3e0034a8ba7b7d..fd1b9b77f278d18f2efea1a0311c35dc9687fcf1 100644 (file)
@@ -403,7 +403,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf32_Rela *reloc)
+elf_machine_lazy_rel (Elf32_Addr l_addr, const Elf32_Rela *reloc)
 {
   switch (ELF32_R_TYPE (reloc->r_info))
     {
index 354fea6ce519fee4327c7c30eb481015e1f61755..3faac558a8c21859bd4d70bc46632bea94ca4667 100644 (file)
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  Sparc64 version.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998 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
@@ -200,7 +200,7 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
 }
 
 static inline void
-elf_machine_lazy_rel (struct link_map *map, const Elf64_Rela *reloc)
+elf_machine_lazy_rel (Elf64_Addr l_addr, const Elf64_Rela *reloc)
 {
   switch (ELF64_R_TYPE (reloc->r_info))
     {