2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 28 May 2004 20:30:29 +0000 (20:30 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 28 May 2004 20:30:29 +0000 (20:30 +0000)
* elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
_bfd_merged_section_offset for local symbols.

bfd/ChangeLog
bfd/elfxx-ia64.c

index de25c0a55d9afbc96b5401443f3ac46cb9366e45..0178acddf28599fdda050dddb9b4e78ca8f89a24 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
+       _bfd_merged_section_offset for local symbols.
+
 2004-05-28  Andrew Stubbs <andrew.stubbs@superh.com>
 
        * Makefile.am: Regenerate dependencies.
index 26b2e455488740767bf8e3f9a3976f73fa6b2732..f72df9e1f14fbe4caa6bc011dfa6dd3ec24a4eb4 100644 (file)
@@ -864,6 +864,15 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
 
          toff = isym->st_value;
          dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, FALSE);
+         
+         if ((tsec->flags & SEC_MERGE)
+             && ELF_ST_TYPE (isym->st_info) == STT_SECTION
+             && tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
+           toff = _bfd_merged_section_offset (abfd, &tsec,
+                                              elf_section_data (tsec)->sec_info,
+                                              toff + irel->r_addend);
+         else
+           toff += irel->r_addend;
        }
       else
        {
@@ -908,14 +917,14 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
              tsec = h->root.u.def.section;
              toff = h->root.u.def.value;
            }
-       }
 
-      if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
-       toff = _bfd_merged_section_offset (abfd, &tsec,
-                                          elf_section_data (tsec)->sec_info,
-                                          toff + irel->r_addend);
-      else
-       toff += irel->r_addend;
+         if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
+           toff = _bfd_merged_section_offset (abfd, &tsec,
+                                              elf_section_data (tsec)->sec_info,
+                                              toff + irel->r_addend);
+         else
+           toff += irel->r_addend;
+       }
 
       symaddr = tsec->output_section->vma + tsec->output_offset + toff;