2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 28 Oct 2004 14:55:41 +0000 (14:55 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 28 Oct 2004 14:55:41 +0000 (14:55 +0000)
* elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.

bfd/ChangeLog
bfd/elfxx-ia64.c

index b228690fa74482d56501b348c5f2dff59f1687ad..b680829d910a526f5d80b331a42d25ae882205ba 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
+       undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
+       R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
+
 2004-10-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
 
        * elf32-sh.c (tpoff): Take alignment into account.
index a7d72bfa426de8cac648ee0bb92df21ea1cf974d..9ae95d3238742b68a6eb2754725afe7b0264fe4d 100644 (file)
@@ -4340,7 +4340,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
        case R_IA64_SECREL64LSB:
          /* Make output-section relative to section where the symbol
             is defined. PR 475  */
-         value -= sym_sec->output_section->vma;
+         if (sym_sec)
+           value -= sym_sec->output_section->vma;
          r = elfNN_ia64_install_value (hit_addr, value, r_type);
          break;