Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so/arch/x86_64 Remove mistaken casts of PLT r...



details:   https://anonhg.NetBSD.org/src/rev/e5da3b4477d5
branches:  trunk
changeset: 511511:e5da3b4477d5
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Wed Jun 20 17:58:05 2001 +0000

description:
Remove mistaken casts of PLT relocations to 32 bit values.

diffstat:

 libexec/ld.elf_so/arch/x86_64/mdreloc.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (35 lines):

diff -r dd6f3128f4bd -r e5da3b4477d5 libexec/ld.elf_so/arch/x86_64/mdreloc.c
--- a/libexec/ld.elf_so/arch/x86_64/mdreloc.c   Wed Jun 20 17:38:59 2001 +0000
+++ b/libexec/ld.elf_so/arch/x86_64/mdreloc.c   Wed Jun 20 17:58:05 2001 +0000
@@ -127,8 +127,8 @@
 _rtld_relocate_plt_object(Obj_Entry *obj, const Elf_Rela *rela, caddr_t *addrp,
                          bool bind_now, bool dodebug)
 {
-       Elf32_Addr *where = (Elf32_Addr *)(obj->relocbase + rela->r_offset);
-       Elf32_Addr new_value;
+       Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
+       Elf_Addr new_value;
 
        /* Fully resolve procedure addresses now */
 
@@ -143,17 +143,16 @@
                if (def == NULL)
                        return -1;
 
-               new_value = (Elf32_Addr)(u_long)
+               new_value = (Elf_Addr)
                    (defobj->relocbase + def->st_value + rela->r_addend);
                rdbg(dodebug, ("bind now %d/fixup in %s --> old=%p new=%p",
                    (int)bind_now,
                    defobj->strtab + def->st_name,
-                   (void *)(u_long)*where, (void *)(u_long)new_value));
+                   (void *)*where, (void *)new_value));
        } else {
                if (!obj->mainprog) {
                        /* Just relocate the GOT slots pointing into the PLT */
-                       new_value = *where + (Elf32_Addr)(u_long)
-                           obj->relocbase;
+                       new_value = *where + (Elf_Addr) obj->relocbase;
                        rdbg(dodebug, ("fixup !main in %s --> %p", obj->path,
                            (void *)(unsigned long)*where));
                } else {



Home | Main Index | Thread Index | Old Index