]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(elf_machine_rela): Let GLOB_DAT and JMP_SLOT see the relocation
authorUlrich Drepper <drepper@redhat.com>
Sun, 25 Jan 1998 18:36:35 +0000 (18:36 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 25 Jan 1998 18:36:35 +0000 (18:36 +0000)
addend.

sysdeps/alpha/dl-machine.h

index 49e69970822a69de8bc0679bce5a04b8e98db8f0..e429e51426bcec0a3c3a5c39c246f118c3a3ce08 100644 (file)
@@ -1,5 +1,5 @@
 /* Machine-dependent ELF dynamic relocation inline functions.  Alpha 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 Richard Henderson <rth@tamu.edu>.
 
@@ -377,6 +377,7 @@ elf_machine_rela (struct link_map *map,
       loadbase = RESOLVE (&sym,
                          r_info == R_ALPHA_JMP_SLOT ? DL_LOOKUP_NOPLT : 0);
       sym_value = sym ? loadbase + sym->st_value : 0;
+      sym_value += reloc->r_addend;
 
       if (r_info == R_ALPHA_GLOB_DAT)
        *reloc_addr = sym_value;
@@ -400,10 +401,9 @@ elf_machine_rela (struct link_map *map,
                = (void *)(map->l_addr + map->l_info[DT_SYMTAB]->d_un.d_ptr);
              sym_value -= map->l_addr;
              sym_value -= dlsymtab[ELF64_R_SYM(reloc->r_info)].st_value;
+             sym_value -= reloc->r_addend;
            }
-         else
 #endif
-           sym_value += reloc->r_addend;
          *reloc_addr = sym_value;
        }
       else