]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 27 Oct 2004 00:46:05 +0000 (00:46 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 27 Oct 2004 00:46:05 +0000 (00:46 +0000)
PR 475
* elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
and R_IA64_SECREL64LSB.

bfd/ChangeLog
bfd/elfxx-ia64.c

index 12db6d7c4fcca0898425e29d0e09d6df9e1208b4..7e9d0855a2c0a725ad3a5d9d25b824a0169aad27 100644 (file)
@@ -1,3 +1,10 @@
+2004-10-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR 475
+       * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
+       R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
+       and R_IA64_SECREL64LSB.
+
 2004-10-26  Paul Brook  <paul@codesourcery.com>
 
        * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
index 917e2c3bbf7f770200e02e7543461f0475cbf2ed..a7d72bfa426de8cac648ee0bb92df21ea1cf974d 100644 (file)
@@ -4338,11 +4338,9 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
        case R_IA64_SECREL32LSB:
        case R_IA64_SECREL64MSB:
        case R_IA64_SECREL64LSB:
-         /* Make output-section relative.  */
-         if (value > input_section->output_section->vma)
-           value -= input_section->output_section->vma;
-         else
-           value = 0;
+         /* Make output-section relative to section where the symbol
+            is defined. PR 475  */
+         value -= sym_sec->output_section->vma;
          r = elfNN_ia64_install_value (hit_addr, value, r_type);
          break;