]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 20 Feb 1999 18:28:24 +0000 (18:28 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 20 Feb 1999 18:28:24 +0000 (18:28 +0000)
* 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.

ChangeLog
sysdeps/alpha/dl-machine.h
sysdeps/i386/dl-machine.h
sysdeps/m68k/dl-machine.h
sysdeps/mips/dl-machine.h
sysdeps/mips/mips64/dl-machine.h
sysdeps/sparc/sparc32/dl-machine.h
sysdeps/sparc/sparc64/dl-machine.h

index dfc4d0da81d8be92764e49423796ee69b0a3175c..e3a242a34f147837f7d777ad5dcb62ed2ed99494 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 1999-02-20  Ulrich Drepper  <drepper@cygnus.com>
 
+       * 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.
+
        * elf/dynamic-link.h (elf_get_dynamic_info): Take new argument with
        load address.  Relocate d_ptr in DT_DTRTAB, DT_SYMTAB, DT_RELA, DT_REL,
        DT_JMPREL, DT_PLTGOT, and DT_VERSYM l_info entry.
@@ -44,6 +56,7 @@
        * sysdeps/powerpc/dl-machine.c (__process_machine_rela): Likewise.
        * sysdeps/mips/dl-machine.h (elf_machine_got_rel): Likewise.
        (elf_machine_got_rel): Likewise for DT_SYMTAB and DT_STRTAB.
+       * sysdeps/mips/mips64/dl-machine.h: Likewise.
 
        * grp/initgroups.c (initgroups): If function in current module was
        successful don't stop but continue to process to get all the groups.
index 6e113807743b2c7fec5e520d45169238208c92d3..21059f5e4fd821dbaf118f563eeaec116046fb5b 100644 (file)
@@ -98,7 +98,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
       /* The GOT entries for the functions in the PLT have not been
         filled in yet.  Their initial contents are directed to the
         PLT which arranges for the dynamic linker to be called.  */
-      plt = l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr;
+      plt = l->l_info[DT_PLTGOT]->d_un.d_ptr;
 
       /* This function will be called to perform the relocation.  */
       if (!profile)
index fb7fc4095e13eb188d947662c89438fb4b059d78..9007f64704b9d60d9b66623118b6e0eeadd83223 100644 (file)
@@ -93,7 +93,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
         in.  Their initial contents will arrange when called to push an
         offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1],
         and then jump to _GLOBAL_OFFSET_TABLE[2].  */
-      got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+      got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
       got[1] = (Elf32_Addr) l; /* Identify this shared object.  */
 
       /* The got[2] entry contains the address of a function which gets
index 8ce24a7f636977565e77bc852e6885a75b9a5c15..afa68efe1bd62ddbf195b20ca85ea8592b7e47f3 100644 (file)
@@ -80,7 +80,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
         to push an offset into the .rela.plt section, push
         _GLOBAL_OFFSET_TABLE_[1], and then jump to
         _GLOBAL_OFFSET_TABLE_[2].  */
-      got = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+      got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
       got[1] = (Elf32_Addr) l; /* Identify this shared object.  */
 
       /* The got[2] entry contains the address of a function which gets
index 749ea00170d255c29635ad88bffa16f19799d4c8..6896e53546008ecd88db0be880d0f9b7e3cc527e 100644 (file)
@@ -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                                                    \
index 1045da15b66c616e39a92f2236d8fb1700178750..e2b62b81994c0b490ae2f7f83cdb5f70ccee7bf7 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, 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                                                    \
index fa8cd45f45cf9b762ad047fc96dcfac9986d27a2..4985afda322910995b6dfdcadc8b19843d52bea4 100644 (file)
@@ -111,7 +111,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
         Their initial contents will arrange when called to set the high 22
         bits of %g1 with an offset into the .rela.plt section and jump to
         the beginning of the PLT.  */
-      plt = (Elf32_Addr *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+      plt = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
       if (! profile)
        rfunc = (Elf32_Addr) &_dl_runtime_resolve;
       else
index 851801bc425fc80f5b57c22c4258962508d59791..b0429898812c74faf5b7ffeefa76aa75dcbff399 100644 (file)
@@ -355,8 +355,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
       extern void _dl_runtime_profile_0 (void);
       extern void _dl_runtime_profile_1 (void);
       Elf64_Addr res0_addr, res1_addr;
-      unsigned int *plt = (unsigned int *)
-       (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr);
+      unsigned int *plt = (void *) l->l_info[DT_PLTGOT]->d_un.d_ptr;
 
       if (! profile)
        {