2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Jul 2004 19:27:15 +0000 (19:27 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Jul 2004 19:27:15 +0000 (19:27 +0000)
PR 240
* elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
.init/.fini sections when trying to relax it.

bfd/ChangeLog
bfd/elfxx-ia64.c

index 7d8efdd6e2db5a6ddff67c2a545547ae0b0e8e0e..b300f86917b984e3ab5ee2a327f7fcb5db2636c7 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR 240
+       * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
+       .init/.fini sections when trying to relax it.
+
 2004-07-09  Jie Zhang  <zhangjie@magima.com.cn>
 
        * elf.c (assign_file_positions_for_segments): Make sure the
index 37b0d24ade32c950fde4ca3487863ba5238e47bb..74fbfbad887a2623a5fb8fe0d2fc873cef160f87 100644 (file)
@@ -943,19 +943,6 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
        {
          bfd_signed_vma offset;
 
-         /* We can't put a trampoline in a .init/.fini section. Issue
-            an error.  */
-         if (strcmp (sec->output_section->name, ".init") == 0
-             || strcmp (sec->output_section->name, ".fini") == 0)
-           {
-             (*_bfd_error_handler)
-               (_("%s: Can't relax br at 0x%lx in section `%s'. Please use brl or indirect branch."),
-                bfd_archive_filename (sec->owner),
-                (unsigned long) roff, sec->name);
-             bfd_set_error (bfd_error_bad_value);
-             goto error_return;
-           }
-
          reladdr = (sec->output_section->vma
                     + sec->output_offset
                     + roff) & (bfd_vma) -4;
@@ -984,6 +971,19 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
          else if (r_type == R_IA64_PCREL60B)
            continue;
 
+         /* We can't put a trampoline in a .init/.fini section. Issue
+            an error.  */
+         if (strcmp (sec->output_section->name, ".init") == 0
+             || strcmp (sec->output_section->name, ".fini") == 0)
+           {
+             (*_bfd_error_handler)
+               (_("%s: Can't relax br at 0x%lx in section `%s'. Please use brl or indirect branch."),
+                bfd_archive_filename (sec->owner),
+                (unsigned long) roff, sec->name);
+             bfd_set_error (bfd_error_bad_value);
+             goto error_return;
+           }
+
          /* If the branch and target are in the same section, you've
             got one honking big section and we can't help you.  You'll
             get an error message later.  */
This page took 0.034805 seconds and 4 git commands to generate.