summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2004-10-27 00:46:05 +0000
committerH.J. Lu <hjl.tools@gmail.com>2004-10-27 00:46:05 +0000
commit97ecf3226de156edd6021981349357ea1094f1f8 (patch)
treecf97ad27e03f65764401c3800e727edf2b71a41f
parentf9dd442b25428d1e1200344973e07af52f439c17 (diff)
downloadppe42-binutils-97ecf3226de156edd6021981349357ea1094f1f8.tar.gz
ppe42-binutils-97ecf3226de156edd6021981349357ea1094f1f8.zip
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.
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elfxx-ia64.c8
2 files changed, 10 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 12db6d7c4f..7e9d0855a2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 917e2c3bbf..a7d72bfa42 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -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;
OpenPOWER on IntegriCloud