diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-08-28 22:54:57 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-08-28 22:54:57 +0000 |
commit | b0cf070b98234cf46009b9be18d379ac3ed7215a (patch) | |
tree | c12209b28a59382f20ca802520f274fa419f9e8f /sysdeps | |
parent | 75311719d35dc0c132e46f883beaeb5b3d9eb75a (diff) | |
download | glibc-b0cf070b98234cf46009b9be18d379ac3ed7215a.tar.gz glibc-b0cf070b98234cf46009b9be18d379ac3ed7215a.tar.xz glibc-b0cf070b98234cf46009b9be18d379ac3ed7215a.zip |
Update.
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
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/alpha/dl-machine.h | 6 | ||||
-rw-r--r-- | sysdeps/arm/dl-machine.h | 8 | ||||
-rw-r--r-- | sysdeps/i386/dl-machine.h | 16 | ||||
-rw-r--r-- | sysdeps/m68k/dl-machine.h | 6 | ||||
-rw-r--r-- | sysdeps/mips/dl-machine.h | 4 | ||||
-rw-r--r-- | sysdeps/powerpc/dl-machine.h | 4 | ||||
-rw-r--r-- | sysdeps/sparc/sparc32/dl-machine.h | 2 | ||||
-rw-r--r-- | sysdeps/sparc/sparc64/dl-machine.h | 4 |
8 files changed, 22 insertions, 28 deletions
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h index 8f639a94b9..648fb78ab0 100644 --- a/sysdeps/alpha/dl-machine.h +++ b/sysdeps/alpha/dl-machine.h @@ -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; diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h index c40f9d7260..49e9d085aa 100644 --- a/sysdeps/arm/dl-machine.h +++ b/sysdeps/arm/dl-machine.h @@ -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"); diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index fdc9e48e0e..a6d8974ab3 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -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 */ diff --git a/sysdeps/m68k/dl-machine.h b/sysdeps/m68k/dl-machine.h index 3e574802c4..b8911dccc7 100644 --- a/sysdeps/m68k/dl-machine.h +++ b/sysdeps/m68k/dl-machine.h @@ -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"); diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 7ee2e20343..bbd22d8777 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -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. */ } diff --git a/sysdeps/powerpc/dl-machine.h b/sysdeps/powerpc/dl-machine.h index 6857f214a9..ab75aa1390 100644 --- a/sysdeps/powerpc/dl-machine.h +++ b/sysdeps/powerpc/dl-machine.h @@ -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. */ } diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h index 5371e3ecee..fd1b9b77f2 100644 --- a/sysdeps/sparc/sparc32/dl-machine.h +++ b/sysdeps/sparc/sparc32/dl-machine.h @@ -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)) { diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h index 354fea6ce5..3faac558a8 100644 --- a/sysdeps/sparc/sparc64/dl-machine.h +++ b/sysdeps/sparc/sparc64/dl-machine.h @@ -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)) { |