1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
authorIan Lance Taylor <ian@airs.com>
Mon, 9 Aug 1999 15:07:32 +0000 (15:07 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 9 Aug 1999 15:07:32 +0000 (15:07 +0000)
* elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
the Sep. 4th, 1998 change.  glibc 2.0.x dynamic linker had bug,
not binutils.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.

bfd/ChangeLog
bfd/elf32-sparc.c
bfd/elf64-sparc.c

index 7b81796778b53a9dbd354be5470599315bb6e9ba..349d9831e08ee7f38e85e186fc4130697c631c53 100644 (file)
@@ -1,3 +1,10 @@
+1999-08-09  Jakub Jelinek  <jj@ultra.linux.cz>
+
+       * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
+       the Sep. 4th, 1998 change.  glibc 2.0.x dynamic linker had bug,
+       not binutils.
+       * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+
 1999-08-09  Geoff Keating  <geoffk@cygnus.com>
 
        * elflink.h (elf_link_output_extsym): Don't output a weak
index 2118c7002726c466727d212ae4a904d56cad8e8a..bb11c070d36a764fe8a080efced17dc0b753a288 100644 (file)
@@ -1475,15 +1475,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
                        }
 
                      outrel.r_info = ELF32_R_INFO (indx, r_type);
-
-                     /* For non-RELATIVE dynamic relocations, we keep the
-                        same symbol, and so generally the same addend.  But
-                        we do need to adjust those relocations referencing
-                        sections.  */
-                     outrel.r_addend = rel->r_addend;
-                     if (r_symndx < symtab_hdr->sh_info
-                         && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
-                       outrel.r_addend += sec->output_offset+sym->st_value;
+                     outrel.r_addend = relocation + rel->r_addend;
                    }
                }
 
index e98f1be893bfe68b95fbd911e5e538f60204bfa4..b02789724f058c58462845bea76ebdb84a5ceb25 100644 (file)
@@ -2249,15 +2249,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                                          ELF64_R_TYPE_INFO (
                                            ELF64_R_TYPE_DATA (rel->r_info),
                                                               r_type));
-
-                       /* For non-RELATIVE dynamic relocations, we keep the
-                          same symbol, and so generally the same addend.  But
-                          we do need to adjust those relocations referencing
-                          sections.  */
-                       outrel.r_addend = rel->r_addend;
-                       if (r_symndx < symtab_hdr->sh_info
-                           && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
-                         outrel.r_addend += sec->output_offset+sym->st_value;
+                       outrel.r_addend = relocation + rel->r_addend;
                      }
                  }