aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mips
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-02-20 18:28:24 +0000
committerUlrich Drepper <drepper@redhat.com>1999-02-20 18:28:24 +0000
commit7796221a03774b61f979e8bb137d40509fd8a1c3 (patch)
tree8d5c1fcdf52327e57df7188c5e05768198daf2d7 /sysdeps/mips
parentf420344cefcadede3a6a4827e4a2dbaca9866439 (diff)
downloadglibc-7796221a03774b61f979e8bb137d40509fd8a1c3.tar
glibc-7796221a03774b61f979e8bb137d40509fd8a1c3.tar.gz
glibc-7796221a03774b61f979e8bb137d40509fd8a1c3.tar.bz2
glibc-7796221a03774b61f979e8bb137d40509fd8a1c3.zip
Update.
* sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): DT_PLTGOT entry is already relocated. * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/m68k/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/mips/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/mips/mips64/dl-machine.h (elf_machine_runtime_setup): Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise.
Diffstat (limited to 'sysdeps/mips')
-rw-r--r--sysdeps/mips/dl-machine.h8
-rw-r--r--sysdeps/mips/mips64/dl-machine.h23
2 files changed, 12 insertions, 19 deletions
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 749ea00170..6896e53546 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -156,8 +156,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
(ref)? sym_loadaddr + ref->st_value: 0; \
})
- got = (ElfW(Addr) *) ((void *) map->l_addr
- + map->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr;
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
@@ -232,8 +231,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
Their initial contents will arrange when called to put an
offset into the .dynsym section in t8, the return address
in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
- got = (ElfW(Addr) *) ((void *) l->l_addr
- + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
/* This function will get called to fix up the GOT entry indicated by
the register t8, and then jump to the resolved address. */
@@ -350,7 +348,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
const char *strtab \
= (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \
const ElfW(Addr) *got \
- = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
+ = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \
const ElfW(Word) local_gotno \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \
diff --git a/sysdeps/mips/mips64/dl-machine.h b/sysdeps/mips/mips64/dl-machine.h
index 1045da15b6..e2b62b8199 100644
--- a/sysdeps/mips/mips64/dl-machine.h
+++ b/sysdeps/mips/mips64/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, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
@@ -23,7 +23,7 @@
#define ELF_MACHINE_NAME "MIPS"
-#define ELF_MACHINE_NO_PLT
+#define ELF_MACHINE_NO_PLT
#include <assert.h>
#include <entry.h>
@@ -144,8 +144,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n;
- const char *strtab
- = ((void *) map->l_addr + map->l_info[DT_STRTAB]->d_un.d_ptr);
+ const char *strtab = (const void *) map->l_info[DT_STRTAB]->d_un.d_ptr;
#define RESOLVE_GOTSYM(sym) \
({ \
@@ -157,8 +156,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
(ref)? sym_loadaddr + ref->st_value: 0; \
})
- got = (ElfW(Addr) *) ((void *) map->l_addr
- + map->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (ElfW(Addr) *) map->l_info[DT_PLTGOT]->d_un.d_ptr;
/* got[0] is reserved. got[1] is also reserved for the dynamic object
generated by gnu ld. Skip these reserved entries from relocation. */
@@ -170,8 +168,7 @@ elf_machine_got_rel (struct link_map *map, int lazy)
/* Handle global got entries. */
got += n;
- sym = (ElfW(Sym) *) ((void *) map->l_addr
- + map->l_info[DT_SYMTAB]->d_un.d_ptr);
+ sym = (ElfW(Sym) *) map->l_info[DT_SYMTAB]->d_un.d_ptr;
sym += map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val;
i = (map->l_info[DT_MIPS (SYMTABNO)]->d_un.d_val
- map->l_info[DT_MIPS (GOTSYM)]->d_un.d_val);
@@ -234,8 +231,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
Their initial contents will arrange when called to put an
offset into the .dynsym section in t8, the return address
in t7 and then jump to _GLOBAL_OFFSET_TABLE[0]. */
- got = (ElfW(Addr) *) ((void *) l->l_addr
- + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+ got = (ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
/* This function will get called to fix up the GOT entry indicated by
the register t8, and then jump to the resolved address. */
@@ -348,11 +344,10 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
{ \
struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \
const ElfW(Sym) *const symtab \
- = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \
- const char *strtab \
- = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \
+ = (const ElfW(Sym) *) l->l_info[DT_SYMTAB]->d_un.d_ptr; \
+ const char *strtab = (const void *) l->l_info[DT_STRTAB]->d_un.d_ptr; \
const ElfW(Addr) *got \
- = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \
+ = (const ElfW(Addr) *) l->l_info[DT_PLTGOT]->d_un.d_ptr; \
const ElfW(Word) local_gotno \
= (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \
const ElfW(Word) gotsym \